diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 591bed26d..2d88ae183 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -1760,7 +1760,7 @@ bool CheckClass::isConstMemberFunc(const Scope *scope, const Token *tok) const return false; } -bool CheckClass::checkConstFunc(const Scope *scope, const Function *func, bool& memberAccessed) +bool CheckClass::checkConstFunc(const Scope *scope, const Function *func, bool& memberAccessed) const { // if the function doesn't have any assignment nor function call, // it can be a const function.. diff --git a/lib/checkclass.h b/lib/checkclass.h index 74f528b59..0370adbb9 100644 --- a/lib/checkclass.h +++ b/lib/checkclass.h @@ -213,7 +213,7 @@ private: bool isMemberVar(const Scope *scope, const Token *tok) const; bool isMemberFunc(const Scope *scope, const Token *tok) const; bool isConstMemberFunc(const Scope *scope, const Token *tok) const; - bool checkConstFunc(const Scope *scope, const Function *func, bool& memberAccessed); + bool checkConstFunc(const Scope *scope, const Function *func, bool& memberAccessed) const; // constructors helper function /** @brief Information about a member variable. Used when checking for uninitialized variables */ diff --git a/lib/checkio.h b/lib/checkio.h index 12fa4b2f0..e3718749d 100644 --- a/lib/checkio.h +++ b/lib/checkio.h @@ -120,7 +120,7 @@ private: void invalidPrintfArgTypeError_float(const Token* tok, unsigned int numFormat, const std::string& specifier, const ArgumentInfo* argInfo); void invalidLengthModifierError(const Token* tok, unsigned int numFormat, const std::string& modifier); void invalidScanfFormatWidthError(const Token* tok, unsigned int numFormat, int width, const Variable *var); - void argumentType(std::ostream & s, const ArgumentInfo * argInfo); + static void argumentType(std::ostream & s, const ArgumentInfo * argInfo); void getErrorMessages(ErrorLogger *errorLogger, const Settings *settings) const { CheckIO c(0, settings, errorLogger);