@@ -3313,7 +3313,7 @@ static bool constructorTakesReference(const Scope * const classScope)
33133313{
33143314 return std::any_of (classScope->functionList .begin (), classScope->functionList .end (), [&](const Function& constructor) {
33153315 if (constructor.isConstructor ()) {
3316- for (int argnr = 0U ; argnr < constructor.argCount (); argnr++) {
3316+ for (size_t argnr = 0U ; argnr < constructor.argCount (); argnr++) {
33173317 const Variable * const argVar = constructor.getArgumentVar (argnr);
33183318 if (argVar && argVar->isReference ()) {
33193319 return true ;
@@ -4036,7 +4036,7 @@ void CheckOtherImpl::checkFuncArgNamesDifferent()
40364036 std::vector<const Token *> declarations (function->argCount ());
40374037 std::vector<const Token *> definitions (function->argCount ());
40384038 const Token * decl = function->argDef ->next ();
4039- for (int j = 0 ; j < function->argCount (); ++j) {
4039+ for (size_t j = 0 ; j < function->argCount (); ++j) {
40404040 // get the definition
40414041 const Variable * variable = function->getArgumentVar (j);
40424042 if (variable) {
@@ -4064,11 +4064,11 @@ void CheckOtherImpl::checkFuncArgNamesDifferent()
40644064 // check for different argument order
40654065 if (warning) {
40664066 bool order_different = false ;
4067- for (int j = 0 ; j < function->argCount (); ++j) {
4067+ for (size_t j = 0 ; j < function->argCount (); ++j) {
40684068 if (!declarations[j] || !definitions[j] || declarations[j]->str () == definitions[j]->str ())
40694069 continue ;
40704070
4071- for (int k = 0 ; k < function->argCount (); ++k) {
4071+ for (size_t k = 0 ; k < function->argCount (); ++k) {
40724072 if (j != k && definitions[k] && declarations[j]->str () == definitions[k]->str ()) {
40734073 order_different = true ;
40744074 break ;
@@ -4082,7 +4082,7 @@ void CheckOtherImpl::checkFuncArgNamesDifferent()
40824082 }
40834083 // check for different argument names
40844084 if (style && inconclusive) {
4085- for (int j = 0 ; j < function->argCount (); ++j) {
4085+ for (size_t j = 0 ; j < function->argCount (); ++j) {
40864086 const bool warn = (declarations[j] != nullptr ) != (definitions[j] != nullptr ) ||
40874087 (declarations[j] && definitions[j] && declarations[j]->str () != definitions[j]->str ());
40884088 if (warn)
@@ -4092,7 +4092,7 @@ void CheckOtherImpl::checkFuncArgNamesDifferent()
40924092 }
40934093}
40944094
4095- void CheckOtherImpl::funcArgNamesDifferent (const std::string & functionName, nonneg int index,
4095+ void CheckOtherImpl::funcArgNamesDifferent (const std::string & functionName, size_t index,
40964096 const Token* declaration, const Token* definition)
40974097{
40984098 std::list<const Token *> tokens = { declaration,definition };
0 commit comments