Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed Cppcheck warning. Function can be const

  • Loading branch information...
commit 2b51993b9fce36a9ab81ff3097902c9fb8c9391a 1 parent 3301728
Daniel Marjamäki authored March 29, 2013
2  lib/checknullpointer.cpp
@@ -439,7 +439,7 @@ bool CheckNullPointer::isPointerDeRef(const Token *tok, bool &unknown)
439 439
 
440 440
 
441 441
 // check if function can assign pointer
442  
-bool CheckNullPointer::CanFunctionAssignPointer(const Token *functiontoken, unsigned int varid, bool& unknown) const
  442
+bool CheckNullPointer::CanFunctionAssignPointer(const Token *functiontoken, unsigned int varid, bool& unknown)
443 443
 {
444 444
     if (Token::Match(functiontoken, "if|while|for|switch|sizeof|catch"))
445 445
         return false;
2  lib/checknullpointer.h
@@ -156,7 +156,7 @@ class CPPCHECKLIB CheckNullPointer : public Check {
156 156
      * @brief Investigate if function call can make pointer null. If
157 157
      * the pointer is passed by value it can't be made a null pointer.
158 158
      */
159  
-    bool CanFunctionAssignPointer(const Token *functiontoken, unsigned int varid, bool& unknown) const;
  159
+    static bool CanFunctionAssignPointer(const Token *functiontoken, unsigned int varid, bool& unknown);
160 160
 };
161 161
 /// @}
162 162
 //---------------------------------------------------------------------------

0 notes on commit 2b51993

Please sign in to comment.
Something went wrong with that request. Please try again.