diff options
author | Rolf Eike Beer <kde@opensource.sf-tec.de> | 2014-01-15 22:56:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-01-16 14:28:29 (GMT) |
commit | c768e398f9c29aa12680fe89a52ce9b00eff2866 (patch) | |
tree | d60f39ce1c2b37557ec83d9e91c64ff9147f94fe /Source/cmInstallCommand.cxx | |
parent | 4c7bac45ae1347ebea6709a7fdf59f50ff7bbb15 (diff) | |
download | CMake-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/cmInstallCommand.cxx')
-rw-r--r-- | Source/cmInstallCommand.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 10578f2..6f2dd65 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -363,7 +363,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) ++targetIt) { - if (this->Makefile->IsAlias(targetIt->c_str())) + if (this->Makefile->IsAlias(*targetIt)) { cmOStringStream e; e << "TARGETS given target \"" << (*targetIt) @@ -372,7 +372,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) return false; } // Lookup this target in the current directory. - if(cmTarget* target=this->Makefile->FindTarget(targetIt->c_str())) + if(cmTarget* target=this->Makefile->FindTarget(*targetIt)) { // Found the target. Check its type. if(target->GetType() != cmTarget::EXECUTABLE && |