Skip to content

Commit

Permalink
HPCC-32814 Use const for unmodifiable variables
Browse files Browse the repository at this point in the history
Signed-off-by: Shamser Ahmed <[email protected]>
  • Loading branch information
shamser committed Dec 13, 2024
1 parent 803672b commit ea2bcfa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testing/unittests/dalitests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3055,7 +3055,7 @@ class DaliSysInfoLoggerTester : public CppUnit::TestFixture
const char * msg;
};

std::vector<TestCase> testCases =
const std::vector<TestCase> testCases =
{
{
LogMsgCategory(MSGAUD_operator, MSGCLS_information, DefaultDetail),
Expand Down Expand Up @@ -3151,7 +3151,7 @@ class DaliSysInfoLoggerTester : public CppUnit::TestFixture

// Make sure written messages matches message read back
matchedMessages.insert(matched->testCaseIndex);
TestCase & testCase = testCases[matched->testCaseIndex];
const TestCase & testCase = testCases[matched->testCaseIndex];
ASSERT(testCase.hidden==sysInfoMsg.queryIsHidden());
ASSERT(testCase.code==sysInfoMsg.queryLogMsgCode());
ASSERT(strcmp(testCase.msg,sysInfoMsg.queryMsg())==0);
Expand Down Expand Up @@ -3187,7 +3187,7 @@ class DaliSysInfoLoggerTester : public CppUnit::TestFixture
{
writtenMessages.clear();
unsigned testCaseIndex=0;
for (auto testCase: testCases)
for (const auto & testCase: testCases)
{
try
{
Expand Down

0 comments on commit ea2bcfa

Please sign in to comment.