Skip to content

Commit 8e29143

Browse files
committed
Use const
1 parent 3cf2f1e commit 8e29143

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/testcppcheck.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ class TestCppcheck : public TestFixture {
336336
std::vector<std::string> files;
337337

338338
std::istringstream istr("void f();\nint x;\n");
339-
simplecpp::TokenList tokens(istr, files, "m1.c");
339+
const simplecpp::TokenList tokens(istr, files, "m1.c");
340340

341341
Preprocessor preprocessor(settings, errorLogger, Standards::Language::C);
342342
ASSERT(preprocessor.loadFiles(tokens, files));
@@ -351,10 +351,10 @@ class TestCppcheck : public TestFixture {
351351

352352
settings.premiumArgs = "misra-c-2012";
353353
CppCheck check(settings, supprs, errorLogger, false, {});
354-
size_t hash1 = check.calculateHash(preprocessor, tokens);
354+
const size_t hash1 = check.calculateHash(preprocessor, tokens);
355355

356356
settings.premiumArgs = "";
357-
size_t hash2 = check.calculateHash(preprocessor, tokens);
357+
const size_t hash2 = check.calculateHash(preprocessor, tokens);
358358

359359
ASSERT(hash1 != hash2);
360360
}

0 commit comments

Comments
 (0)