Fixed inconclusive warnings regarding const correctness.

This commit is contained in:
orbitcowboy 2015-01-20 09:09:16 +01:00
parent ff415871bd
commit bf1565bd34
4 changed files with 4 additions and 4 deletions

View File

@ -963,7 +963,7 @@ static Token * createAstAtToken(Token *tok, bool cpp)
return tok; return tok;
} }
void TokenList::createAst() void TokenList::createAst() const
{ {
for (Token *tok = _front; tok; tok = tok ? tok->next() : NULL) { for (Token *tok = _front; tok; tok = tok ? tok->next() : NULL) {
tok = createAstAtToken(tok, isCPP()); tok = createAstAtToken(tok, isCPP());

View File

@ -126,7 +126,7 @@ public:
*/ */
unsigned long long calculateChecksum() const; unsigned long long calculateChecksum() const;
void createAst(); void createAst() const;
private: private:
/** Disable copy constructor, no implementation */ /** Disable copy constructor, no implementation */

View File

@ -245,7 +245,7 @@ void TestFixture::run(const std::string &str)
run(); run();
} }
void TestFixture::warn(const char msg[]) void TestFixture::warn(const char msg[]) const
{ {
warnings << "Warning: " << currentTest << " " << msg << std::endl; warnings << "Warning: " << currentTest << " " << msg << std::endl;
} }

View File

@ -71,7 +71,7 @@ public:
virtual void reportOut(const std::string &outmsg); virtual void reportOut(const std::string &outmsg);
virtual void reportErr(const ErrorLogger::ErrorMessage &msg); virtual void reportErr(const ErrorLogger::ErrorMessage &msg);
void run(const std::string &str); 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); void warnUnsimplified(const std::string& unsimplified, const std::string& simplified);
TestFixture(const std::string &_name); TestFixture(const std::string &_name);