diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2020-03-20 17:05:24 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2020-03-23 21:41:43 (GMT) |
commit | 48adc297211181a97fab75ef0260fda5147c1195 (patch) | |
tree | 17f278522ccaff4b03bc1eb81cb5177fd42d0f37 /Source/cmExtraCodeBlocksGenerator.cxx | |
parent | bfb69f9543bfa7f9f3c9488bf7e740f21896cec4 (diff) | |
download | CMake-48adc297211181a97fab75ef0260fda5147c1195.zip CMake-48adc297211181a97fab75ef0260fda5147c1195.tar.gz CMake-48adc297211181a97fab75ef0260fda5147c1195.tar.bz2 |
replace "std::string::find(x) == 0" with cmHasPrefix()
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index b710467..42fd0ea 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -218,7 +218,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( // Convert for (std::string const& listFile : listFiles) { // don't put cmake's own files into the project (#12110): - if (listFile.find(cmSystemTools::GetCMakeRoot()) == 0) { + if (cmHasPrefix(listFile, cmSystemTools::GetCMakeRoot())) { continue; } @@ -301,11 +301,11 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( case cmStateEnums::UTILITY: // Add all utility targets, except the Nightly/Continuous/ // Experimental-"sub"targets as e.g. NightlyStart - if (((targetName.find("Nightly") == 0) && + if ((cmHasLiteralPrefix(targetName, "Nightly") && (targetName != "Nightly")) || - ((targetName.find("Continuous") == 0) && + (cmHasLiteralPrefix(targetName, "Continuous") && (targetName != "Continuous")) || - ((targetName.find("Experimental") == 0) && + (cmHasLiteralPrefix(targetName, "Experimental") && (targetName != "Experimental"))) { break; } |