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/paths.cpp | |
parent | 804154afbee8843dde358837ec18ab7bfb785088 (diff) | |
download | manaplus-fe6c2a585a7ba59582723b2fef827dd15bbc8f22.tar.gz manaplus-fe6c2a585a7ba59582723b2fef827dd15bbc8f22.tar.bz2 manaplus-fe6c2a585a7ba59582723b2fef827dd15bbc8f22.tar.xz manaplus-fe6c2a585a7ba59582723b2fef827dd15bbc8f22.zip |
Fix code style.
Diffstat (limited to 'src/utils/paths.cpp')
-rw-r--r-- | src/utils/paths.cpp | 4 |
1 files changed, 1 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; |