mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-11 23:43:58 +03:00
Range-for loop with const reference
Prevent copy-ctor and dtor to be called. Found by Cppcheck (constVariableReference)
This commit is contained in:
1 parent
3850def5e6
commit
01c22dfaee
1 file changed
+1
-1
@@ -194,7 +194,7 @@ int runTest(int argc, char* argv[])
|
||||
R"("command" *: *"disconnect".*"success" *: *true.*"type" *: *"response")"
|
||||
};
|
||||
|
||||
for (auto& regexString : expectedResponses) {
|
||||
for (const auto& regexString : expectedResponses) {
|
||||
cmsys::RegularExpression regex(regexString);
|
||||
if (!regex.find(debuggerResponse)) {
|
||||
std::cout << "Expected response not found: " << regexString << std::endl;
|
||||
|
||||
Reference in new issue
Block a user