mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 14:50:15 -05:00
cmCTest: Fix clang-tidy performance-unnecessary-copy-initialization diagnostic
This commit is contained in:
+2
-2
@@ -2311,10 +2311,10 @@ int cmCTest::Run(std::vector<std::string>& args, std::string* output)
|
||||
success = this->SetArgsFromPreset("", listPresets);
|
||||
} else {
|
||||
if (cmHasLiteralPrefix(*it, "--preset=")) {
|
||||
auto presetName = it->substr(9);
|
||||
auto const& presetName = it->substr(9);
|
||||
success = this->SetArgsFromPreset(presetName, listPresets);
|
||||
} else if (++it != args.end()) {
|
||||
auto presetName = *it;
|
||||
auto const& presetName = *it;
|
||||
success = this->SetArgsFromPreset(presetName, listPresets);
|
||||
} else {
|
||||
cmSystemTools::Error("'--preset' requires an argument");
|
||||
|
||||
Reference in New Issue
Block a user