.length() > 0 == !.emepty()
This commit is contained in:
parent
dc79f9630f
commit
cb58cf8163
|
@ -82,7 +82,7 @@ std::string Path::simplifyPath(std::string originalPath)
|
||||||
std::vector<std::string> pathParts;
|
std::vector<std::string> pathParts;
|
||||||
for (std::size_t i = 0; i < originalPath.size(); ++i) {
|
for (std::size_t i = 0; i < originalPath.size(); ++i) {
|
||||||
if (originalPath[i] == '/' || originalPath[i] == '\\') {
|
if (originalPath[i] == '/' || originalPath[i] == '\\') {
|
||||||
if (subPath.length() > 0) {
|
if (!subPath.empty()) {
|
||||||
pathParts.push_back(subPath);
|
pathParts.push_back(subPath);
|
||||||
subPath = "";
|
subPath = "";
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ std::string Path::simplifyPath(std::string originalPath)
|
||||||
subPath.append(1, originalPath[i]);
|
subPath.append(1, originalPath[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subPath.length() > 0)
|
if (!subPath.empty())
|
||||||
pathParts.push_back(subPath);
|
pathParts.push_back(subPath);
|
||||||
|
|
||||||
// First filter out all double slashes
|
// First filter out all double slashes
|
||||||
|
|
Loading…
Reference in New Issue