summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2016-04-18 09:22:00 (GMT)
committerBrad King <brad.king@kitware.com>2016-04-19 16:44:08 (GMT)
commit7a73c404dd63aef0e68da9ef70ac706a6339c476 (patch)
tree9c990bbe3985b59bb1db675ab9c37e16234beb89 /Source/cmQtAutoGenerators.cxx
parentfa4ae9fb12b61473f028a3ec38433f82a030c578 (diff)
downloadCMake-7a73c404dd63aef0e68da9ef70ac706a6339c476.zip
CMake-7a73c404dd63aef0e68da9ef70ac706a6339c476.tar.gz
CMake-7a73c404dd63aef0e68da9ef70ac706a6339c476.tar.bz2
Autogen: Use SystemTools string functions instead of rolling out own
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx22
1 files changed, 2 insertions, 20 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);
-}