@@ -4641,8 +4641,8 @@ const Function * Function::getOverriddenFunctionRecursive(const ::Type* baseType
46414641 const Scope *parent = derivedFromType->classScope ;
46424642
46434643 // check if function defined in base class
4644- auto range = parent->functionMap .equal_range (tokenDef->str ());
4645- for (std::multimap<std::string, const Function*>::const_iterator it = range.first ; it != range.second ; ++it) {
4644+ auto range = utils::as_const ( parent->functionMap ) .equal_range (tokenDef->str ());
4645+ for (auto it = range.first ; it != range.second ; ++it) {
46464646 const Function * func = it->second ;
46474647 if (func->isImplicitlyVirtual ()) { // Base is virtual and of same name
46484648 const Token *temp1 = func->tokenDef ->previous ();
@@ -5549,8 +5549,8 @@ void Scope::findFunctionInBase(const std::string & name, nonneg int args, std::v
55495549 if (base->classScope == this ) // Ticket #5120, #5125: Recursive class; tok should have been found already
55505550 continue ;
55515551
5552- auto range = base->classScope ->functionMap .equal_range (name);
5553- for (std::multimap<std::string, const Function*>::const_iterator it = range.first ; it != range.second ; ++it) {
5552+ auto range = utils::as_const ( base->classScope ->functionMap ) .equal_range (name);
5553+ for (auto it = range.first ; it != range.second ; ++it) {
55545554 const Function *func = it->second ;
55555555 if ((func->isVariadic () && args >= (func->argCount () - 1 )) ||
55565556 (args == func->argCount () || (args < func->argCount () && args >= func->minArgCount ()))) {
@@ -5709,8 +5709,8 @@ const Function* Scope::findFunction(const Token *tok, bool requireConst, Referen
57095709 const std::size_t args = arguments.size ();
57105710
57115711 auto addMatchingFunctions = [&](const Scope *scope) {
5712- auto range = scope->functionMap .equal_range (tok->str ());
5713- for (std::multimap<std::string, const Function *>::const_iterator it = range.first ; it != range.second ; ++it) {
5712+ auto range = utils::as_const ( scope->functionMap ) .equal_range (tok->str ());
5713+ for (auto it = range.first ; it != range.second ; ++it) {
57145714 const Function *func = it->second ;
57155715 if (ref == Reference::LValue && func->hasRvalRefQualifier ())
57165716 continue ;
@@ -6479,8 +6479,8 @@ Function * SymbolDatabase::findFunctionInScope(const Token *func, const Scope *n
64796479 const Function * function = nullptr ;
64806480 const bool destructor = func->strAt (-1 ) == " ~" ;
64816481
6482- auto range = ns->functionMap .equal_range (func->str ());
6483- for (std::multimap<std::string, const Function*>::const_iterator it = range.first ; it != range.second ; ++it) {
6482+ auto range = utils::as_const ( ns->functionMap ) .equal_range (func->str ());
6483+ for (auto it = range.first ; it != range.second ; ++it) {
64846484 if (it->second ->argsMatch (ns, it->second ->argDef , func->next (), path, path_length) &&
64856485 it->second ->isDestructor () == destructor) {
64866486 function = it->second ;
0 commit comments