@@ -3291,7 +3291,7 @@ static bool constructorTakesReference(const Scope * const classScope)
32913291{
32923292 return std::any_of (classScope->functionList .begin (), classScope->functionList .end (), [&](const Function& constructor) {
32933293 if (constructor.isConstructor ()) {
3294- for (int argnr = 0U ; argnr < constructor.argCount (); argnr++) {
3294+ for (size_t argnr = 0U ; argnr < constructor.argCount (); argnr++) {
32953295 const Variable * const argVar = constructor.getArgumentVar (argnr);
32963296 if (argVar && argVar->isReference ()) {
32973297 return true ;
@@ -4014,7 +4014,7 @@ void CheckOther::checkFuncArgNamesDifferent()
40144014 std::vector<const Token *> declarations (function->argCount ());
40154015 std::vector<const Token *> definitions (function->argCount ());
40164016 const Token * decl = function->argDef ->next ();
4017- for (int j = 0 ; j < function->argCount (); ++j) {
4017+ for (size_t j = 0 ; j < function->argCount (); ++j) {
40184018 declarations[j] = nullptr ;
40194019 definitions[j] = nullptr ;
40204020 // get the definition
@@ -4044,11 +4044,11 @@ void CheckOther::checkFuncArgNamesDifferent()
40444044 // check for different argument order
40454045 if (warning) {
40464046 bool order_different = false ;
4047- for (int j = 0 ; j < function->argCount (); ++j) {
4047+ for (size_t j = 0 ; j < function->argCount (); ++j) {
40484048 if (!declarations[j] || !definitions[j] || declarations[j]->str () == definitions[j]->str ())
40494049 continue ;
40504050
4051- for (int k = 0 ; k < function->argCount (); ++k) {
4051+ for (size_t k = 0 ; k < function->argCount (); ++k) {
40524052 if (j != k && definitions[k] && declarations[j]->str () == definitions[k]->str ()) {
40534053 order_different = true ;
40544054 break ;
@@ -4062,15 +4062,15 @@ void CheckOther::checkFuncArgNamesDifferent()
40624062 }
40634063 // check for different argument names
40644064 if (style && inconclusive) {
4065- for (int j = 0 ; j < function->argCount (); ++j) {
4065+ for (size_t j = 0 ; j < function->argCount (); ++j) {
40664066 if (declarations[j] && definitions[j] && declarations[j]->str () != definitions[j]->str ())
40674067 funcArgNamesDifferent (function->name (), j, declarations[j], definitions[j]);
40684068 }
40694069 }
40704070 }
40714071}
40724072
4073- void CheckOther::funcArgNamesDifferent (const std::string & functionName, nonneg int index,
4073+ void CheckOther::funcArgNamesDifferent (const std::string & functionName, size_t index,
40744074 const Token* declaration, const Token* definition)
40754075{
40764076 std::list<const Token *> tokens = { declaration,definition };
0 commit comments