summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/Directory.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-12 13:35:12 (GMT)
committerBrad King <brad.king@kitware.com>2019-02-12 13:35:12 (GMT)
commitded4bc136e5b120b2d047dc9b8eb6f7446043d08 (patch)
tree052052ff36a666f1c670ad612f90620fe6d43847 /Source/kwsys/Directory.cxx
parent9d2ab63aaf5fb29d812dbfc942da4d7671c5d1b3 (diff)
parentf3999a21c85e6caf19feef7c90afce3969d9102a (diff)
downloadCMake-ded4bc136e5b120b2d047dc9b8eb6f7446043d08.zip
CMake-ded4bc136e5b120b2d047dc9b8eb6f7446043d08.tar.gz
CMake-ded4bc136e5b120b2d047dc9b8eb6f7446043d08.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys: KWSys 2019-02-12 (44676809)
Diffstat (limited to 'Source/kwsys/Directory.cxx')
-rw-r--r--Source/kwsys/Directory.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/kwsys/Directory.cxx b/Source/kwsys/Directory.cxx
index 31b1c15..59530a4 100644
--- a/Source/kwsys/Directory.cxx
+++ b/Source/kwsys/Directory.cxx
@@ -102,7 +102,7 @@ bool Directory::Load(const std::string& name)
# endif
char* buf;
size_t n = name.size();
- if (*name.rbegin() == '/' || *name.rbegin() == '\\') {
+ if (name.back() == '/' || name.back() == '\\') {
buf = new char[n + 1 + 1];
sprintf(buf, "%s*", name.c_str());
} else {
@@ -144,7 +144,7 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)
# endif
char* buf;
size_t n = name.size();
- if (*name.rbegin() == '/') {
+ if (name.back() == '/') {
buf = new char[n + 1 + 1];
sprintf(buf, "%s*", name.c_str());
} else {