Fixed Cppcheck warning. Function can be const

This commit is contained in:
Daniel Marjamäki 2013-03-29 17:55:29 +01:00
parent 3301728c50
commit 2b51993b9f
2 changed files with 2 additions and 2 deletions

View File

@ -439,7 +439,7 @@ bool CheckNullPointer::isPointerDeRef(const Token *tok, bool &unknown)
// check if function can assign pointer // check if function can assign pointer
bool CheckNullPointer::CanFunctionAssignPointer(const Token *functiontoken, unsigned int varid, bool& unknown) const bool CheckNullPointer::CanFunctionAssignPointer(const Token *functiontoken, unsigned int varid, bool& unknown)
{ {
if (Token::Match(functiontoken, "if|while|for|switch|sizeof|catch")) if (Token::Match(functiontoken, "if|while|for|switch|sizeof|catch"))
return false; return false;

View File

@ -156,7 +156,7 @@ private:
* @brief Investigate if function call can make pointer null. If * @brief Investigate if function call can make pointer null. If
* the pointer is passed by value it can't be made a null pointer. * the pointer is passed by value it can't be made a null pointer.
*/ */
bool CanFunctionAssignPointer(const Token *functiontoken, unsigned int varid, bool& unknown) const; static bool CanFunctionAssignPointer(const Token *functiontoken, unsigned int varid, bool& unknown);
}; };
/// @} /// @}
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------