mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
cmStateSnapshot: Return const reference from GetExecutionListFile()
This commit is contained in:
@@ -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;
|
||||
|
@@ -943,7 +943,7 @@ public:
|
||||
|
||||
const char* GetDefineFlagsCMP0059() const;
|
||||
|
||||
std::string GetExecutionFilePath() const;
|
||||
std::string const& GetExecutionFilePath() const;
|
||||
|
||||
void EnforceDirectoryLevelRules() const;
|
||||
|
||||
|
@@ -53,7 +53,7 @@ void cmStateSnapshot::SetListFile(const std::string& listfile)
|
||||
*this->Position->ExecutionListFile = listfile;
|
||||
}
|
||||
|
||||
std::string cmStateSnapshot::GetExecutionListFile() const
|
||||
std::string const& cmStateSnapshot::GetExecutionListFile() const
|
||||
{
|
||||
return *this->Position->ExecutionListFile;
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ public:
|
||||
|
||||
void SetListFile(std::string const& listfile);
|
||||
|
||||
std::string GetExecutionListFile() const;
|
||||
std::string const& GetExecutionListFile() const;
|
||||
|
||||
std::vector<cmStateSnapshot> GetChildren();
|
||||
|
||||
|
Reference in New Issue
Block a user