diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2020-03-20 16:04:40 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2020-03-23 19:19:26 (GMT) |
commit | bfb69f9543bfa7f9f3c9488bf7e740f21896cec4 (patch) | |
tree | 866c20d05a20fae42cf06ef848796ba621d643f2 /Source/cmSystemTools.cxx | |
parent | 7df84ffe58572a4535b08bc7b76148a60d38fbb4 (diff) | |
download | CMake-bfb69f9543bfa7f9f3c9488bf7e740f21896cec4.zip CMake-bfb69f9543bfa7f9f3c9488bf7e740f21896cec4.tar.gz CMake-bfb69f9543bfa7f9f3c9488bf7e740f21896cec4.tar.bz2 |
replace "substr(0, xx) ==" with cmHasPrefix()
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index d8cd705..071f18e 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1055,8 +1055,7 @@ bool cmSystemTools::SimpleGlob(const std::string& glob, if (type < 0 && !cmSystemTools::FileIsDirectory(fname)) { continue; } - if (sfname.size() >= ppath.size() && - sfname.substr(0, ppath.size()) == ppath) { + if (cmHasPrefix(sfname, ppath)) { files.push_back(fname); res = true; } |