Fixed Cppcheck warning. Function can be const
This commit is contained in:
parent
3301728c50
commit
2b51993b9f
|
@ -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;
|
||||
|
|
|
@ -156,7 +156,7 @@ private:
|
|||
* @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);
|
||||
};
|
||||
/// @}
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue