mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-14 05:20:50 -05:00
cmMakefile::FormatListFileStack: Refactor 'while' into 'for'
This commit is contained in:
@@ -4256,11 +4256,11 @@ void cmMakefile::AddCMakeDependFilesFromUser()
|
||||
std::string cmMakefile::FormatListFileStack() const
|
||||
{
|
||||
std::vector<std::string> listFiles;
|
||||
cmStateSnapshot snp = this->StateSnapshot;
|
||||
while (snp.IsValid()) {
|
||||
listFiles.push_back(snp.GetExecutionListFile());
|
||||
snp = snp.GetCallStackParent();
|
||||
for (auto snp = this->StateSnapshot; snp.IsValid();
|
||||
snp = snp.GetCallStackParent()) {
|
||||
listFiles.emplace_back(snp.GetExecutionListFile());
|
||||
}
|
||||
|
||||
std::reverse(listFiles.begin(), listFiles.end());
|
||||
std::ostringstream tmp;
|
||||
size_t depth = listFiles.size();
|
||||
|
||||
Reference in New Issue
Block a user