summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorRolf Eike Beer <kde@opensource.sf-tec.de>2014-01-15 22:56:38 (GMT)
committerBrad King <brad.king@kitware.com>2014-01-16 14:28:29 (GMT)
commitc768e398f9c29aa12680fe89a52ce9b00eff2866 (patch)
treed60f39ce1c2b37557ec83d9e91c64ff9147f94fe /Source/cmGeneratorExpressionEvaluator.cxx
parent4c7bac45ae1347ebea6709a7fdf59f50ff7bbb15 (diff)
downloadCMake-c768e398f9c29aa12680fe89a52ce9b00eff2866.zip
CMake-c768e398f9c29aa12680fe89a52ce9b00eff2866.tar.gz
CMake-c768e398f9c29aa12680fe89a52ce9b00eff2866.tar.bz2
cmMakefile: make some methods take const std::string& instead of const char*
Most callers already have a std::string, on which they called c_str() to pass it into these methods, which internally converted it back to std::string. Pass a std::string directly to these methods now, avoiding all these conversions. Those methods that only pass in a const char* will get the conversion to std::string now only once.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 1feb03a..7036992 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -822,7 +822,7 @@ std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
// self-referencing loop.
continue;
}
- if (context->Makefile->FindTargetToUse(it->c_str()))
+ if (context->Makefile->FindTargetToUse(*it))
{
depString +=
sep + "$<TARGET_PROPERTY:" + *it + "," + interfacePropertyName + ">";
@@ -912,18 +912,16 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
}
if(propertyName == "ALIASED_TARGET")
{
- if(context->Makefile->IsAlias(targetName.c_str()))
+ if(context->Makefile->IsAlias(targetName))
{
- if(cmTarget* tgt =
- context->Makefile->FindTargetToUse(targetName.c_str()))
+ if(cmTarget* tgt = context->Makefile->FindTargetToUse(targetName))
{
return tgt->GetName();
}
}
return "";
}
- target = context->Makefile->FindTargetToUse(
- targetName.c_str());
+ target = context->Makefile->FindTargetToUse(targetName);
if (!target)
{
@@ -1476,7 +1474,7 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
"Expression syntax not recognized.");
return std::string();
}
- cmTarget* target = context->Makefile->FindTargetToUse(name.c_str());
+ cmTarget* target = context->Makefile->FindTargetToUse(name);
if(!target)
{
::reportError(context, content->GetOriginalExpression(),