diff options
author | Brad King <brad.king@kitware.com> | 2017-11-15 15:32:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-11-15 15:47:07 (GMT) |
commit | c871446abc9f9f33bd302ed059037d719eb9e2d9 (patch) | |
tree | 7189bca12aad188ed10b739f1c98607891bf7266 /Source/cmSourceGroup.cxx | |
parent | 1fe9e49bad0ad4f540ceda028106d9af89084946 (diff) | |
download | CMake-c871446abc9f9f33bd302ed059037d719eb9e2d9.zip CMake-c871446abc9f9f33bd302ed059037d719eb9e2d9.tar.gz CMake-c871446abc9f9f33bd302ed059037d719eb9e2d9.tar.bz2 |
cmSourceGroup: Return strings from GetName and GetFullName
Diffstat (limited to 'Source/cmSourceGroup.cxx')
-rw-r--r-- | Source/cmSourceGroup.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx index fba4c31..18bcb49 100644 --- a/Source/cmSourceGroup.cxx +++ b/Source/cmSourceGroup.cxx @@ -60,14 +60,14 @@ void cmSourceGroup::AddGroupFile(const std::string& name) this->GroupFiles.insert(name); } -const char* cmSourceGroup::GetName() const +std::string const& cmSourceGroup::GetName() const { - return this->Name.c_str(); + return this->Name; } -const char* cmSourceGroup::GetFullName() const +std::string const& cmSourceGroup::GetFullName() const { - return this->FullName.c_str(); + return this->FullName; } bool cmSourceGroup::MatchesRegex(const char* name) @@ -105,7 +105,7 @@ cmSourceGroup* cmSourceGroup::LookupChild(const char* name) const // st for (; iter != end; ++iter) { - std::string sgName = iter->GetName(); + std::string const& sgName = iter->GetName(); // look if descenened is the one were looking for if (sgName == name) { |