diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2016-04-18 09:22:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-04-19 16:44:08 (GMT) |
commit | 7a73c404dd63aef0e68da9ef70ac706a6339c476 (patch) | |
tree | 9c990bbe3985b59bb1db675ab9c37e16234beb89 /Source | |
parent | fa4ae9fb12b61473f028a3ec38433f82a030c578 (diff) | |
download | CMake-7a73c404dd63aef0e68da9ef70ac706a6339c476.zip CMake-7a73c404dd63aef0e68da9ef70ac706a6339c476.tar.gz CMake-7a73c404dd63aef0e68da9ef70ac706a6339c476.tar.bz2 |
Autogen: Use SystemTools string functions instead of rolling out own
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 22 | ||||
-rw-r--r-- | Source/cmQtAutoGenerators.h | 2 |
2 files changed, 2 insertions, 22 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index ebe08b0..ee40e7a 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -464,7 +464,7 @@ void cmQtAutoGenerators::Init() std::list<std::string>::iterator it = this->MocIncludes.begin(); while (it != this->MocIncludes.end()) { - if (this->StartsWith(*it, binDir)) + if (cmsys::SystemTools::StringStartsWith(*it, binDir.c_str())) { sortedMocIncludes.push_back(*it); it = this->MocIncludes.erase(it); @@ -477,7 +477,7 @@ void cmQtAutoGenerators::Init() it = this->MocIncludes.begin(); while (it != this->MocIncludes.end()) { - if (this->StartsWith(*it, srcDir)) + if (cmsys::SystemTools::StringStartsWith(*it, srcDir.c_str())) { sortedMocIncludes.push_back(*it); it = this->MocIncludes.erase(it); @@ -1365,21 +1365,3 @@ std::string cmQtAutoGenerators::Join(const std::vector<std::string>& lst, result.erase(result.end() - 1); return result; } - - -bool cmQtAutoGenerators::StartsWith(const std::string& str, - const std::string& with) -{ - return (str.substr(0, with.length()) == with); -} - - -bool cmQtAutoGenerators::EndsWith(const std::string& str, - const std::string& with) -{ - if (with.length() > (str.length())) - { - return false; - } - return (str.substr(str.length() - with.length(), with.length()) == with); -} diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index ab7b6ed..d5a23ab 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -70,8 +70,6 @@ private: void Init(); std::string Join(const std::vector<std::string>& lst, char separator); - bool EndsWith(const std::string& str, const std::string& with); - bool StartsWith(const std::string& str, const std::string& with); static void MergeUicOptions(std::vector<std::string> &opts, const std::vector<std::string> &fileOpts, bool isQt5); |