diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index ebe08b09cd..ee40e7a7a2 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -464,7 +464,7 @@ void cmQtAutoGenerators::Init() std::list::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& 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 ab7b6ed225..d5a23ab27b 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -70,8 +70,6 @@ private: void Init(); std::string Join(const std::vector& 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 &opts, const std::vector &fileOpts, bool isQt5);