diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-10 23:04:11 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-03-11 14:03:50 (GMT) |
commit | 21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch) | |
tree | 8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmGeneratorExpressionEvaluator.cxx | |
parent | e21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff) | |
download | CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.zip CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.gz CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.bz2 |
Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 43c1794..14b2a1a 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -39,7 +39,7 @@ void reportError(cmGeneratorExpressionContext *context, << " " << expr << "\n" << result; context->Makefile->GetCMakeInstance() - ->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(), + ->IssueMessage(cmake::FATAL_ERROR, e.str(), context->Backtrace); } @@ -393,8 +393,8 @@ struct CompilerIdNode : public cmGeneratorExpressionNode const std::string &lang) const { const char *compilerId = context->Makefile ? - context->Makefile->GetSafeDefinition(( - "CMAKE_" + lang + "_COMPILER_ID").c_str()) : ""; + context->Makefile->GetSafeDefinition( + "CMAKE_" + lang + "_COMPILER_ID") : ""; if (parameters.size() == 0) { return compilerId ? compilerId : ""; @@ -428,7 +428,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode ->GetPolicyWarning(cmPolicies::CMP0044); context->Makefile->GetCMakeInstance() ->IssueMessage(cmake::AUTHOR_WARNING, - e.str().c_str(), context->Backtrace); + e.str(), context->Backtrace); } case cmPolicies::OLD: return "1"; @@ -500,8 +500,8 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode const std::string &lang) const { const char *compilerVersion = context->Makefile ? - context->Makefile->GetSafeDefinition(( - "CMAKE_" + lang + "_COMPILER_VERSION").c_str()) : ""; + context->Makefile->GetSafeDefinition( + "CMAKE_" + lang + "_COMPILER_VERSION") : ""; if (parameters.size() == 0) { return compilerVersion ? compilerVersion : ""; @@ -747,7 +747,7 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode std::string mapProp = "MAP_IMPORTED_CONFIG_"; mapProp += cmSystemTools::UpperCase(context->Config); if(const char* mapValue = - context->CurrentTarget->GetProperty(mapProp.c_str())) + context->CurrentTarget->GetProperty(mapProp)) { cmSystemTools::ExpandListArgument(cmSystemTools::UpperCase(mapValue), mappedConfigs); @@ -1022,7 +1022,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode break; } - const char *prop = target->GetProperty(propertyName.c_str()); + const char *prop = target->GetProperty(propertyName); if (dagCheckerParent) { |