From cb58cf81635e7ff6935c3ea7c3d1a9d628a38aa8 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 1 Jun 2017 01:42:29 +0300 Subject: [PATCH] .length() > 0 == !.emepty() --- lib/path.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/path.cpp b/lib/path.cpp index ec31cad39..db779b318 100644 --- a/lib/path.cpp +++ b/lib/path.cpp @@ -82,7 +82,7 @@ std::string Path::simplifyPath(std::string originalPath) std::vector 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