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:
fschwa 2021-04-06 16:57:27 +02:00 committed by GitHub
parent e0f9627201
commit 806dbf77b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ static bool parseInlineSuppressionCommentToken(const simplecpp::Token *tok, std:
return false;
// 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)
return false;