diff options
author | Oleksandr Koval <oleksandr.koval.dev@gmail.com> | 2020-09-03 21:17:32 (GMT) |
---|---|---|
committer | Oleksandr Koval <oleksandr.koval.dev@gmail.com> | 2020-09-03 21:17:32 (GMT) |
commit | 879bd7fd9c84fa72001632818fce43339d755e3b (patch) | |
tree | 7353020ca6f4fb86a793fe4ab70a100fce460c1b /Source/cmMakefile.cxx | |
parent | ca5babfd7a1da8e32f927ad086fdd91c2b09853b (diff) | |
download | CMake-879bd7fd9c84fa72001632818fce43339d755e3b.zip CMake-879bd7fd9c84fa72001632818fce43339d755e3b.tar.gz CMake-879bd7fd9c84fa72001632818fce43339d755e3b.tar.bz2 |
cmStateSnapshot: Return const reference from GetExecutionListFile()
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index f384e21..3e95caa 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3347,7 +3347,7 @@ bool cmMakefile::IsLoopBlock() const return !this->LoopBlockCounter.empty() && this->LoopBlockCounter.top() > 0; } -std::string cmMakefile::GetExecutionFilePath() const +std::string const& cmMakefile::GetExecutionFilePath() const { assert(this->StateSnapshot.IsValid()); return this->StateSnapshot.GetExecutionListFile(); @@ -3357,8 +3357,8 @@ bool cmMakefile::ExpandArguments(std::vector<cmListFileArgument> const& inArgs, std::vector<std::string>& outArgs, const char* filename) const { - std::string efp = this->GetExecutionFilePath(); if (!filename) { + auto const& efp = this->GetExecutionFilePath(); filename = efp.c_str(); } std::string value; @@ -3389,8 +3389,8 @@ bool cmMakefile::ExpandArguments( std::vector<cmListFileArgument> const& inArgs, std::vector<cmExpandedCommandArgument>& outArgs, const char* filename) const { - std::string efp = this->GetExecutionFilePath(); if (!filename) { + auto const& efp = this->GetExecutionFilePath(); filename = efp.c_str(); } std::string value; |