.length() > 0 == !.emepty()

This commit is contained in:
Ayaz Salikhov 2017-06-01 01:42:29 +03:00
parent dc79f9630f
commit cb58cf8163
1 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ std::string Path::simplifyPath(std::string originalPath)
std::vector<std::string> pathParts;
for (std::size_t i = 0; i < originalPath.size(); ++i) {
if (originalPath[i] == '/' || originalPath[i] == '\\') {
if (subPath.length() > 0) {
if (!subPath.empty()) {
pathParts.push_back(subPath);
subPath = "";
}
@ -92,7 +92,7 @@ std::string Path::simplifyPath(std::string originalPath)
subPath.append(1, originalPath[i]);
}
if (subPath.length() > 0)
if (!subPath.empty())
pathParts.push_back(subPath);
// First filter out all double slashes