summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.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/cmGeneratorTarget.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/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 0fcee3e..2573c85 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -68,7 +68,7 @@ static void handleSystemIncludesDep(cmMakefile *mf, const std::string &name,
std::vector<std::string>& result,
bool excludeImported)
{
- cmTarget* depTgt = mf->FindTargetToUse(name.c_str());
+ cmTarget* depTgt = mf->FindTargetToUse(name);
if (!depTgt)
{
@@ -230,7 +230,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
{
if (uniqueDeps.insert(*li).second)
{
- cmTarget* tgt = this->Makefile->FindTargetToUse(li->c_str());
+ cmTarget* tgt = this->Makefile->FindTargetToUse(*li);
if (!tgt)
{
@@ -394,7 +394,7 @@ void cmGeneratorTarget::LookupObjectLibraries()
oli != objLibs.end(); ++oli)
{
std::string const& objLibName = *oli;
- if(cmTarget* objLib = this->Makefile->FindTargetToUse(objLibName.c_str()))
+ if(cmTarget* objLib = this->Makefile->FindTargetToUse(objLibName))
{
if(objLib->GetType() == cmTarget::OBJECT_LIBRARY)
{
@@ -607,7 +607,7 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
}
// Check for a target with this name.
- if(cmTarget* t = this->Makefile->FindTargetToUse(util.c_str()))
+ if(cmTarget* t = this->Makefile->FindTargetToUse(util))
{
// If we find the target and the dep was given as a full path,
// then make sure it was not a full path to something else, and
@@ -661,7 +661,7 @@ cmTargetTraceDependencies
{
std::string const& command = *cit->begin();
// Check for a target with this name.
- if(cmTarget* t = this->Makefile->FindTargetToUse(command.c_str()))
+ if(cmTarget* t = this->Makefile->FindTargetToUse(command))
{
if(t->GetType() == cmTarget::EXECUTABLE)
{