mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
cmComputeLinkInformation: reserve space in built-up string
This should avoid any reallocations that would occur in this function.
This commit is contained in:
@@ -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 == '.') {
|
||||
|
||||
Reference in New Issue
Block a user