summaryrefslogtreecommitdiffstats
path: root/Source/cmSetPropertyCommand.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/cmSetPropertyCommand.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/cmSetPropertyCommand.cxx')
-rw-r--r--Source/cmSetPropertyCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx
index 4207860..1a6f1d6 100644
--- a/Source/cmSetPropertyCommand.cxx
+++ b/Source/cmSetPropertyCommand.cxx
@@ -244,12 +244,12 @@ bool cmSetPropertyCommand::HandleTargetMode()
for(std::set<cmStdString>::const_iterator ni = this->Names.begin();
ni != this->Names.end(); ++ni)
{
- if (this->Makefile->IsAlias(ni->c_str()))
+ if (this->Makefile->IsAlias(*ni))
{
this->SetError("can not be used on an ALIAS target.");
return false;
}
- if(cmTarget* target = this->Makefile->FindTargetToUse(ni->c_str()))
+ if(cmTarget* target = this->Makefile->FindTargetToUse(*ni))
{
// Handle the current target.
if(!this->HandleTarget(target))