From c768e398f9c29aa12680fe89a52ce9b00eff2866 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Wed, 15 Jan 2014 23:56:38 +0100 Subject: 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. --- Source/cmAddLibraryCommand.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/cmAddLibraryCommand.cxx') diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 2627445600..a29f784209 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -363,7 +363,7 @@ bool cmAddLibraryCommand } // Make sure the target does not already exist. - if(this->Makefile->FindTargetToUse(libName.c_str())) + if(this->Makefile->FindTargetToUse(libName)) { cmOStringStream e; e << "cannot create imported target \"" << libName -- cgit v1.2.1