From ee3a55fc48a884634eb639b88a8549b066256c3a Mon Sep 17 00:00:00 2001 From: Martin Duffy Date: Fri, 7 Feb 2025 12:21:45 -0500 Subject: cmMakefileGenerator: Update GetConfigName to return const reference --- Source/cmLocalUnixMakefileGenerator3.cxx | 2 +- Source/cmLocalUnixMakefileGenerator3.h | 2 +- Source/cmMakefileTargetGenerator.cxx | 2 +- Source/cmMakefileTargetGenerator.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 68c79ed..7654466 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -143,7 +143,7 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3( cmLocalUnixMakefileGenerator3::~cmLocalUnixMakefileGenerator3() = default; -std::string cmLocalUnixMakefileGenerator3::GetConfigName() const +std::string const& cmLocalUnixMakefileGenerator3::GetConfigName() const { auto const& configNames = this->GetConfigNames(); assert(configNames.size() == 1); diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index aaf9da3..573c2c5 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -34,7 +34,7 @@ public: cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmMakefile* mf); ~cmLocalUnixMakefileGenerator3() override; - std::string GetConfigName() const; + std::string const& GetConfigName() const; void ComputeHomeRelativeOutputPath() override; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 4a6ee39..0adffc6 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -110,7 +110,7 @@ std::unique_ptr cmMakefileTargetGenerator::New( return result; } -std::string cmMakefileTargetGenerator::GetConfigName() const +std::string const& cmMakefileTargetGenerator::GetConfigName() const { auto const& configNames = this->LocalGenerator->GetConfigNames(); assert(configNames.size() == 1); diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index e895647..484d223 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -56,7 +56,7 @@ public: cmGeneratorTarget* GetGeneratorTarget() { return this->GeneratorTarget; } - std::string GetConfigName() const; + std::string const& GetConfigName() const; protected: void GetDeviceLinkFlags(std::string& linkFlags, -- cgit v0.12