diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-04-08 15:55:38 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-04-13 15:26:03 (GMT) |
commit | 609c3b7cdc4f633a49424de667ba332e483ffb46 (patch) | |
tree | 7b09f5b4286d6cd442a53ca26710fad69bbf4dd0 /Source | |
parent | 89207abf1f32b862ba509b94967c57d9120d9c13 (diff) | |
download | CMake-609c3b7cdc4f633a49424de667ba332e483ffb46.zip CMake-609c3b7cdc4f633a49424de667ba332e483ffb46.tar.gz CMake-609c3b7cdc4f633a49424de667ba332e483ffb46.tar.bz2 |
cmComputeLinkInformation: reserve space in built-up string
This should avoid any reallocations that would occur in this function.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 4d297e8..d8a6204 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -998,6 +998,7 @@ std::string cmComputeLinkInformation::CreateExtensionRegex( std::string cmComputeLinkInformation::NoCaseExpression(const char* str) { std::string ret; + ret.reserve(strlen(str) * 4); const char* s = str; while (*s) { if (*s == '.') { |