use size() instead of hard-coded length value (#3199)
Co-authored-by: Frederik Schwarzer <frederik.schwarzer@smart-battery-solutions.de>
This commit is contained in:
parent
e0f9627201
commit
806dbf77b6
|
@ -96,7 +96,7 @@ static bool parseInlineSuppressionCommentToken(const simplecpp::Token *tok, std:
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// skip spaces after "cppcheck-suppress"
|
// skip spaces after "cppcheck-suppress"
|
||||||
const std::string::size_type pos2 = comment.find_first_not_of(" ", pos1+17);
|
const std::string::size_type pos2 = comment.find_first_not_of(" ", pos1+cppchecksuppress.size());
|
||||||
if (pos2 == std::string::npos)
|
if (pos2 == std::string::npos)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue