Fix some occurrences using string by value rather than by const&

Fix issues diagnosed by clang-tidy
 - performance-unnecessary-value-param
 - performance-unnecessary-copy-initialization

Signed-off-by: Matthias Maennich <matthias@maennich.net>
This commit is contained in:
Matthias Maennich
2017-09-19 15:54:08 +02:00
committed by Brad King
parent 8cc33aeaec
commit bb0ad1bea8
8 changed files with 20 additions and 18 deletions

View File

@@ -573,7 +573,7 @@ void cmGlobalXCodeGenerator::ClearXCodeObjects()
void cmGlobalXCodeGenerator::addObject(cmXCodeObject* obj)
{
if (obj->GetType() == cmXCodeObject::OBJECT) {
std::string id = obj->GetId();
const std::string& id = obj->GetId();
// If this is a duplicate id, it's an error:
//
@@ -2748,7 +2748,7 @@ bool cmGlobalXCodeGenerator::CreateGroups(
}
cmXCodeObject* cmGlobalXCodeGenerator::CreatePBXGroup(cmXCodeObject* parent,
std::string name)
const std::string& name)
{
cmXCodeObject* parentChildren = nullptr;
if (parent)