summaryrefslogtreecommitdiff
path: root/Source/cmCustomCommandGenerator.cxx
diff options
context:
space:
mode:
authorRolf Eike Beer <kde@opensource.sf-tec.de>2014-01-15 23:56:38 +0100
committerBrad King <brad.king@kitware.com>2014-01-16 09:28:29 -0500
commitc768e398f9c29aa12680fe89a52ce9b00eff2866 (patch)
treed60f39ce1c2b37557ec83d9e91c64ff9147f94fe /Source/cmCustomCommandGenerator.cxx
parent4c7bac45ae1347ebea6709a7fdf59f50ff7bbb15 (diff)
downloadcmake-c768e398f9c29aa12680fe89a52ce9b00eff2866.tar.gz
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/cmCustomCommandGenerator.cxx')
-rw-r--r--Source/cmCustomCommandGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx
index f2f77eea04..f24dfa212e 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -41,7 +41,7 @@ unsigned int cmCustomCommandGenerator::GetNumberOfCommands() const
std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const
{
std::string const& argv0 = this->CC.GetCommandLines()[c][0];
- cmTarget* target = this->Makefile->FindTargetToUse(argv0.c_str());
+ cmTarget* target = this->Makefile->FindTargetToUse(argv0);
if(target && target->GetType() == cmTarget::EXECUTABLE &&
(target->IsImported() || !this->Makefile->IsOn("CMAKE_CROSSCOMPILING")))
{