diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-19 18:54:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-19 18:54:56 +0300 |
commit | fe6c2a585a7ba59582723b2fef827dd15bbc8f22 (patch) | |
tree | d2e1c9015084f4d99474babd00df0d8974eea498 /src/utils | |
parent | 804154afbee8843dde358837ec18ab7bfb785088 (diff) | |
download | mv-fe6c2a585a7ba59582723b2fef827dd15bbc8f22.tar.gz mv-fe6c2a585a7ba59582723b2fef827dd15bbc8f22.tar.bz2 mv-fe6c2a585a7ba59582723b2fef827dd15bbc8f22.tar.xz mv-fe6c2a585a7ba59582723b2fef827dd15bbc8f22.zip |
Fix code style.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/paths.cpp | 4 | ||||
-rw-r--r-- | src/utils/paths.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/paths.cpp b/src/utils/paths.cpp index c00a3f39d..228276efd 100644 --- a/src/utils/paths.cpp +++ b/src/utils/paths.cpp @@ -85,9 +85,7 @@ std::string removeLast(std::string str) if (pos2 == std::string::npos || pos3 > pos2) pos2 = pos3; } - if (pos2 == std::string::npos) - pos2 = -1; - if (pos2 >= 0) + if (pos2 != std::string::npos) return str.substr(0, pos2); else return str; diff --git a/src/utils/paths.h b/src/utils/paths.h index 18fa4629e..ba87ab961 100644 --- a/src/utils/paths.h +++ b/src/utils/paths.h @@ -31,6 +31,8 @@ bool checkPath(std::string path); std::string &fixDirSeparators(std::string &str); +std::string removeLast(std::string str); + std::string getSelfName(); #endif // UTILS_PATHS_H |