From bf1565bd34f7d843086010baa5b412ec5de94a99 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Tue, 20 Jan 2015 09:09:16 +0100 Subject: [PATCH] Fixed inconclusive warnings regarding const correctness. --- lib/tokenlist.cpp | 2 +- lib/tokenlist.h | 2 +- test/testsuite.cpp | 2 +- test/testsuite.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 31261ee03..e8a8d05f7 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -963,7 +963,7 @@ static Token * createAstAtToken(Token *tok, bool cpp) return tok; } -void TokenList::createAst() +void TokenList::createAst() const { for (Token *tok = _front; tok; tok = tok ? tok->next() : NULL) { tok = createAstAtToken(tok, isCPP()); diff --git a/lib/tokenlist.h b/lib/tokenlist.h index 4d4a6cf77..c2005d613 100644 --- a/lib/tokenlist.h +++ b/lib/tokenlist.h @@ -126,7 +126,7 @@ public: */ unsigned long long calculateChecksum() const; - void createAst(); + void createAst() const; private: /** Disable copy constructor, no implementation */ diff --git a/test/testsuite.cpp b/test/testsuite.cpp index 9629cf63b..1ecba779b 100644 --- a/test/testsuite.cpp +++ b/test/testsuite.cpp @@ -245,7 +245,7 @@ void TestFixture::run(const std::string &str) run(); } -void TestFixture::warn(const char msg[]) +void TestFixture::warn(const char msg[]) const { warnings << "Warning: " << currentTest << " " << msg << std::endl; } diff --git a/test/testsuite.h b/test/testsuite.h index 61ca5143c..7d8f9d42e 100644 --- a/test/testsuite.h +++ b/test/testsuite.h @@ -71,7 +71,7 @@ public: virtual void reportOut(const std::string &outmsg); virtual void reportErr(const ErrorLogger::ErrorMessage &msg); void run(const std::string &str); - void warn(const char msg[]); + void warn(const char msg[]) const; void warnUnsimplified(const std::string& unsimplified, const std::string& simplified); TestFixture(const std::string &_name);