summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-15 15:32:01 (GMT)
committerBrad King <brad.king@kitware.com>2017-11-15 15:47:07 (GMT)
commitc871446abc9f9f33bd302ed059037d719eb9e2d9 (patch)
tree7189bca12aad188ed10b739f1c98607891bf7266 /Source/cmMakefile.cxx
parent1fe9e49bad0ad4f540ceda028106d9af89084946 (diff)
downloadCMake-c871446abc9f9f33bd302ed059037d719eb9e2d9.zip
CMake-c871446abc9f9f33bd302ed059037d719eb9e2d9.tar.gz
CMake-c871446abc9f9f33bd302ed059037d719eb9e2d9.tar.bz2
cmSourceGroup: Return strings from GetName and GetFullName
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4109b90..5a11a90 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1950,7 +1950,7 @@ cmSourceGroup* cmMakefile::GetSourceGroup(
// first look for source group starting with the same as the one we want
for (cmSourceGroup const& srcGroup : this->SourceGroups) {
- std::string sgName = srcGroup.GetName();
+ std::string const& sgName = srcGroup.GetName();
if (sgName == name[0]) {
sg = const_cast<cmSourceGroup*>(&srcGroup);
break;
@@ -2014,7 +2014,8 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
}
// build the whole source group path
for (++i; i <= lastElement; ++i) {
- sg->AddChild(cmSourceGroup(name[i].c_str(), nullptr, sg->GetFullName()));
+ sg->AddChild(
+ cmSourceGroup(name[i].c_str(), nullptr, sg->GetFullName().c_str()));
sg = sg->LookupChild(name[i].c_str());
}