summaryrefslogtreecommitdiffstats
path: root/Source/cmSearchPath.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSearchPath.cxx')
-rw-r--r--Source/cmSearchPath.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmSearchPath.cxx b/Source/cmSearchPath.cxx
index 0f51e0e..f98984e 100644
--- a/Source/cmSearchPath.cxx
+++ b/Source/cmSearchPath.cxx
@@ -144,7 +144,7 @@ void cmSearchPath::AddSuffixes(const std::vector<std::string>& suffixes)
// this will get incorrectly considered a network
// path on windows and cause huge delays.
std::string p = inPath;
- if (!p.empty() && *p.rbegin() != '/') {
+ if (!p.empty() && p.back() != '/') {
p += "/";
}
@@ -176,7 +176,7 @@ void cmSearchPath::AddPrefixPaths(const std::vector<std::string>& paths,
for (std::string const& path : paths) {
std::string dir = path;
- if (!subdir.empty() && !dir.empty() && *dir.rbegin() != '/') {
+ if (!subdir.empty() && !dir.empty() && dir.back() != '/') {
dir += "/";
}
if (subdir == "include" || subdir == "lib") {