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
|
// 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;
|
||||||
|
|
|
@ -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);
|
||||||
};
|
};
|
||||||
/// @}
|
/// @}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue