Skip to content

Commit bf1565b

Browse files
committed
Fixed inconclusive warnings regarding const correctness.
1 parent ff41587 commit bf1565b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/tokenlist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ static Token * createAstAtToken(Token *tok, bool cpp)
963963
return tok;
964964
}
965965

966-
void TokenList::createAst()
966+
void TokenList::createAst() const
967967
{
968968
for (Token *tok = _front; tok; tok = tok ? tok->next() : NULL) {
969969
tok = createAstAtToken(tok, isCPP());

lib/tokenlist.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class CPPCHECKLIB TokenList {
126126
*/
127127
unsigned long long calculateChecksum() const;
128128

129-
void createAst();
129+
void createAst() const;
130130

131131
private:
132132
/** Disable copy constructor, no implementation */

test/testsuite.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ void TestFixture::run(const std::string &str)
245245
run();
246246
}
247247

248-
void TestFixture::warn(const char msg[])
248+
void TestFixture::warn(const char msg[]) const
249249
{
250250
warnings << "Warning: " << currentTest << " " << msg << std::endl;
251251
}

test/testsuite.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class TestFixture : public ErrorLogger {
7171
virtual void reportOut(const std::string &outmsg);
7272
virtual void reportErr(const ErrorLogger::ErrorMessage &msg);
7373
void run(const std::string &str);
74-
void warn(const char msg[]);
74+
void warn(const char msg[]) const;
7575
void warnUnsimplified(const std::string& unsimplified, const std::string& simplified);
7676

7777
TestFixture(const std::string &_name);

0 commit comments

Comments
 (0)