Permalink
Browse files

Fixed Cppcheck warning. Function can be const

  • Loading branch information...
1 parent 3301728 commit 2b51993b9fce36a9ab81ff3097902c9fb8c9391a @danmar committed Mar 29, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/checknullpointer.cpp
  2. +1 −1 lib/checknullpointer.h
View
@@ -439,7 +439,7 @@ bool CheckNullPointer::isPointerDeRef(const Token *tok, bool &unknown)
// 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"))
return false;
View
@@ -156,7 +156,7 @@ class CPPCHECKLIB CheckNullPointer : public Check {
* @brief Investigate if function call can make pointer null. If
* 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);
};
/// @}
//---------------------------------------------------------------------------

0 comments on commit 2b51993

Please sign in to comment.