mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-04 04:03:22 +03:00
Source: reduce useless std::string building
This commit is contained in:
1 parent
99e8ac2fb6
commit
f4bd297d05
1 file changed
+4
-2
@@ -191,7 +191,7 @@ std::string cmOutputConverter::ConvertToOutputFormat(cm::string_view source,
|
||||
OutputFormat format,
|
||||
bool useWatcomQuote) const
|
||||
{
|
||||
std::string result(source);
|
||||
std::string result;
|
||||
// Convert it to an output path.
|
||||
if (format == SHELL || format == NINJAMULTI) {
|
||||
result = this->ConvertDirectorySeparatorsForShell(source);
|
||||
@@ -199,7 +199,9 @@ std::string cmOutputConverter::ConvertToOutputFormat(cm::string_view source,
|
||||
format == NINJAMULTI);
|
||||
} else if (format == RESPONSE) {
|
||||
result =
|
||||
this->EscapeForShell(result, false, false, useWatcomQuote, false, true);
|
||||
this->EscapeForShell(source, false, false, useWatcomQuote, false, true);
|
||||
} else {
|
||||
result = std::string(source);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user