Skip to content

Commit

Permalink
Use compare()
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jun 26, 2023
1 parent b4e0cfb commit c0fb0bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/checkunusedvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ void CheckUnusedVar::checkFunctionVariableUsage()
(!op1Var->valueType() || op1Var->valueType()->type == ValueType::Type::UNKNOWN_TYPE)) {
// Check in the library if we should bailout or not..
std::string typeName = op1Var->getTypeName();
if (typeName.find("::") == 0)
if (typeName.compare(0, 2, "::") == 0)
typeName.erase(typeName.begin(), typeName.begin() + 2);
switch (mSettings->library.getTypeCheck("unusedvar", typeName)) {
case Library::TypeCheck::def:
Expand Down

0 comments on commit c0fb0bf

Please sign in to comment.