mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 22:00:10 -05:00
cmGlobalGenerator: Optimize Printable() method from GeneratedMakeCommand
This commit is contained in:
@@ -69,20 +69,7 @@ struct GeneratedMakeCommand
|
|||||||
PrimaryCommand.insert(PrimaryCommand.end(), start, end);
|
PrimaryCommand.insert(PrimaryCommand.end(), start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Printable() const
|
std::string Printable() const { return cmJoin(PrimaryCommand, " "); }
|
||||||
{
|
|
||||||
std::size_t size = PrimaryCommand.size();
|
|
||||||
for (auto&& i : PrimaryCommand) {
|
|
||||||
size += i.size();
|
|
||||||
}
|
|
||||||
std::string buffer;
|
|
||||||
buffer.reserve(size);
|
|
||||||
for (auto&& i : PrimaryCommand) {
|
|
||||||
buffer.append(i);
|
|
||||||
buffer.append(1, ' ');
|
|
||||||
}
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::string> PrimaryCommand;
|
std::vector<std::string> PrimaryCommand;
|
||||||
bool RequiresOutputForward = false;
|
bool RequiresOutputForward = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user