@@ -141,7 +141,7 @@ void VarInfo::possibleUsageAll(const std::string &functionName)
141141}
142142
143143
144- void CheckLeakAutoVar::leakError (const Token *tok, const std::string &varname, int type)
144+ void CheckLeakAutoVar::leakError (const Token *tok, const std::string &varname, int type) const
145145{
146146 const CheckMemoryLeak checkmemleak (mTokenizer , mErrorLogger , mSettings );
147147 if (Library::isresource (type))
@@ -150,14 +150,14 @@ void CheckLeakAutoVar::leakError(const Token *tok, const std::string &varname, i
150150 checkmemleak.memleakError (tok, varname);
151151}
152152
153- void CheckLeakAutoVar::mismatchError (const Token *deallocTok, const Token *allocTok, const std::string &varname)
153+ void CheckLeakAutoVar::mismatchError (const Token *deallocTok, const Token *allocTok, const std::string &varname) const
154154{
155155 const CheckMemoryLeak c (mTokenizer , mErrorLogger , mSettings );
156156 const std::list<const Token *> callstack = { allocTok, deallocTok };
157157 c.mismatchAllocDealloc (callstack, varname);
158158}
159159
160- void CheckLeakAutoVar::deallocUseError (const Token *tok, const std::string &varname)
160+ void CheckLeakAutoVar::deallocUseError (const Token *tok, const std::string &varname) const
161161{
162162 const CheckMemoryLeak c (mTokenizer , mErrorLogger , mSettings );
163163 c.deallocuseError (tok, varname);
@@ -842,7 +842,7 @@ const Token * CheckLeakAutoVar::checkTokenInsideExpression(const Token * const t
842842}
843843
844844
845- void CheckLeakAutoVar::changeAllocStatusIfRealloc (std::map<int , VarInfo::AllocInfo> &alloctype, const Token *fTok , const Token *retTok)
845+ void CheckLeakAutoVar::changeAllocStatusIfRealloc (std::map<int , VarInfo::AllocInfo> &alloctype, const Token *fTok , const Token *retTok) const
846846{
847847 const Library::AllocFunc* f = mSettings ->library .getReallocFuncInfo (fTok );
848848 if (f && f->arg == -1 && f->reallocArg > 0 && f->reallocArg <= numberOfArguments (fTok )) {
0 commit comments