summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Kosiorek <bartosz.kosiorek@tomtom.com>2019-03-04 09:27:15 (GMT)
committerBartosz Kosiorek <bartosz.kosiorek@tomtom.com>2019-03-04 09:44:15 (GMT)
commitebc94500c1726f393ac6119848d53deca47e1ccf (patch)
treeef50220bf02229bdadc8e710ee167117ac3f31bf
parentfdeb364a84f99fd1d1f34a929d02a86653ea364f (diff)
downloadCMake-ebc94500c1726f393ac6119848d53deca47e1ccf.zip
CMake-ebc94500c1726f393ac6119848d53deca47e1ccf.tar.gz
CMake-ebc94500c1726f393ac6119848d53deca47e1ccf.tar.bz2
cmGlobalGenerator: Optimize Printable() method from GeneratedMakeCommand
-rw-r--r--Source/cmGlobalGenerator.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index d69c311..1eda572 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -69,20 +69,7 @@ struct GeneratedMakeCommand
PrimaryCommand.insert(PrimaryCommand.end(), start, end);
}
- std::string Printable() const
- {
- 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::string Printable() const { return cmJoin(PrimaryCommand, " "); }
std::vector<std::string> PrimaryCommand;
bool RequiresOutputForward = false;