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/cmGlobalXCodeGenerator.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/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 9db4817..fab5bce 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -34,6 +34,7 @@ #include "cmSourceGroup.h" #include "cmState.h" #include "cmStateTypes.h" +#include "cmStringAlgorithms.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmXCode21Object.h" @@ -2407,7 +2408,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // Convert "XCODE_ATTRIBUTE_*" properties directly. { for (auto const& prop : gtgt->GetPropertyKeys()) { - if (prop.find("XCODE_ATTRIBUTE_") == 0) { + if (cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { std::string attribute = prop.substr(16); this->FilterConfigurationAttribute(configName, attribute); if (!attribute.empty()) { @@ -3143,7 +3144,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( // Put this last so it can override existing settings // Convert "CMAKE_XCODE_ATTRIBUTE_*" variables directly. for (const auto& var : this->CurrentMakefile->GetDefinitions()) { - if (var.find("CMAKE_XCODE_ATTRIBUTE_") == 0) { + if (cmHasLiteralPrefix(var, "CMAKE_XCODE_ATTRIBUTE_")) { std::string attribute = var.substr(22); this->FilterConfigurationAttribute(config.first, attribute); if (!attribute.empty()) { |