summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-02-02 10:29:22 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-02-02 17:42:08 (GMT)
commited0fa784ebb2b7e4d6db8b40d16f84f34692890a (patch)
tree11a18e2e286c31c806e9f44d984e440f940bc8d6 /Source/cmSystemTools.cxx
parent254b7260f49caaca78b16761d70d6239626d2129 (diff)
downloadCMake-ed0fa784ebb2b7e4d6db8b40d16f84f34692890a.zip
CMake-ed0fa784ebb2b7e4d6db8b40d16f84f34692890a.tar.gz
CMake-ed0fa784ebb2b7e4d6db8b40d16f84f34692890a.tar.bz2
cmSystemTools: Let `GetFileFormat` accept a `std::stding const&`
The `const char*` used formerly was converted to a `std::string` internally anyway.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 5d8c079..1d20e2f 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1330,13 +1330,11 @@ bool cmSystemTools::SimpleGlob(const std::string& glob,
return res;
}
-cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext)
+cmSystemTools::FileFormat cmSystemTools::GetFileFormat(std::string const& ext)
{
- if (!cext || *cext == 0) {
+ if (ext.empty()) {
return cmSystemTools::NO_FILE_FORMAT;
}
- // std::string ext = cmSystemTools::LowerCase(cext);
- std::string ext = cext;
if (ext == "c" || ext == ".c" || ext == "m" || ext == ".m") {
return cmSystemTools::C_FILE_FORMAT;
}