mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
Merge topic 'GetExecutionListFile-by-ref'
879bd7fd9c
cmStateSnapshot: Return const reference from GetExecutionListFile()
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5186
This commit is contained in:
@@ -3347,7 +3347,7 @@ bool cmMakefile::IsLoopBlock() const
|
|||||||
return !this->LoopBlockCounter.empty() && this->LoopBlockCounter.top() > 0;
|
return !this->LoopBlockCounter.empty() && this->LoopBlockCounter.top() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmMakefile::GetExecutionFilePath() const
|
std::string const& cmMakefile::GetExecutionFilePath() const
|
||||||
{
|
{
|
||||||
assert(this->StateSnapshot.IsValid());
|
assert(this->StateSnapshot.IsValid());
|
||||||
return this->StateSnapshot.GetExecutionListFile();
|
return this->StateSnapshot.GetExecutionListFile();
|
||||||
@@ -3357,8 +3357,8 @@ bool cmMakefile::ExpandArguments(std::vector<cmListFileArgument> const& inArgs,
|
|||||||
std::vector<std::string>& outArgs,
|
std::vector<std::string>& outArgs,
|
||||||
const char* filename) const
|
const char* filename) const
|
||||||
{
|
{
|
||||||
std::string efp = this->GetExecutionFilePath();
|
|
||||||
if (!filename) {
|
if (!filename) {
|
||||||
|
auto const& efp = this->GetExecutionFilePath();
|
||||||
filename = efp.c_str();
|
filename = efp.c_str();
|
||||||
}
|
}
|
||||||
std::string value;
|
std::string value;
|
||||||
@@ -3389,8 +3389,8 @@ bool cmMakefile::ExpandArguments(
|
|||||||
std::vector<cmListFileArgument> const& inArgs,
|
std::vector<cmListFileArgument> const& inArgs,
|
||||||
std::vector<cmExpandedCommandArgument>& outArgs, const char* filename) const
|
std::vector<cmExpandedCommandArgument>& outArgs, const char* filename) const
|
||||||
{
|
{
|
||||||
std::string efp = this->GetExecutionFilePath();
|
|
||||||
if (!filename) {
|
if (!filename) {
|
||||||
|
auto const& efp = this->GetExecutionFilePath();
|
||||||
filename = efp.c_str();
|
filename = efp.c_str();
|
||||||
}
|
}
|
||||||
std::string value;
|
std::string value;
|
||||||
|
@@ -942,7 +942,7 @@ public:
|
|||||||
|
|
||||||
const char* GetDefineFlagsCMP0059() const;
|
const char* GetDefineFlagsCMP0059() const;
|
||||||
|
|
||||||
std::string GetExecutionFilePath() const;
|
std::string const& GetExecutionFilePath() const;
|
||||||
|
|
||||||
void EnforceDirectoryLevelRules() const;
|
void EnforceDirectoryLevelRules() const;
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ void cmStateSnapshot::SetListFile(const std::string& listfile)
|
|||||||
*this->Position->ExecutionListFile = listfile;
|
*this->Position->ExecutionListFile = listfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmStateSnapshot::GetExecutionListFile() const
|
std::string const& cmStateSnapshot::GetExecutionListFile() const
|
||||||
{
|
{
|
||||||
return *this->Position->ExecutionListFile;
|
return *this->Position->ExecutionListFile;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ public:
|
|||||||
|
|
||||||
void SetListFile(std::string const& listfile);
|
void SetListFile(std::string const& listfile);
|
||||||
|
|
||||||
std::string GetExecutionListFile() const;
|
std::string const& GetExecutionListFile() const;
|
||||||
|
|
||||||
std::vector<cmStateSnapshot> GetChildren();
|
std::vector<cmStateSnapshot> GetChildren();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user