You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bool newFunc = true; // Is this function already in the database?
649
-
for (std::multimap<std::string, const Function *>::const_iterator i = scope->functionMap.find(tok->str()); i != scope->functionMap.end() && i->first == tok->str(); ++i) {
650
-
if (i->second->argsMatch(scope, i->second->argDef, argStart, emptyString, 0)) {
649
+
auto range = scope->functionMap.equal_range(tok->str());
650
+
for (std::multimap<std::string, const Function*>::const_iterator it = range.first; it != range.second; ++it) {
651
+
if (it->second->argsMatch(scope, it->second->argDef, argStart, emptyString, 0)) {
for (std::multimap<std::string, const Function *>::iterator i = scope->functionMap.find(tok->str()); i != scope->functionMap.end() && i->first == tok->str(); ++i) {
2935
-
const Function *f = i->second;
2935
+
auto range = scope->functionMap.equal_range(tok->str());
2936
+
for (std::multimap<std::string, const Function*>::const_iterator it = range.first; it != range.second; ++it) {
2937
+
const Function *f = it->second;
2936
2938
if (f->hasBody())
2937
2939
continue;
2938
2940
if (f->argsMatch(scope, f->argDef, argStart, emptyString, 0)) {
for (std::multimap<std::string, const Function *>::iterator it = scope1->functionMap.find((*tok)->str()); it != scope1->functionMap.end() && it->first == (*tok)->str(); ++it) {
3095
+
auto range = scope1->functionMap.equal_range((*tok)->str());
3096
+
for (std::multimap<std::string, const Function*>::const_iterator it = range.first; it != range.second; ++it) {
3094
3097
Function * func = const_cast<Function *>(it->second);
3095
3098
if (!func->hasBody()) {
3096
3099
if (func->argsMatch(scope1, func->argDef, (*tok)->next(), path, path_length)) {
@@ -4150,7 +4153,8 @@ const Function * Function::getOverriddenFunctionRecursive(const ::Type* baseType
for (std::multimap<std::string, const Function *>::const_iterator it = parent->functionMap.find(tokenDef->str()); it != parent->functionMap.end() && it->first == tokenDef->str(); ++it) {
4156
+
auto range = parent->functionMap.equal_range(tokenDef->str());
4157
+
for (std::multimap<std::string, const Function*>::const_iterator it = range.first; it != range.second; ++it) {
4154
4158
const Function * func = it->second;
4155
4159
if (func->hasVirtualSpecifier()) { // Base is virtual and of same name
if (base->classScope == this) // Ticket #5120, #5125: Recursive class; tok should have been found already
4977
4981
continue;
4978
4982
4979
-
for (std::multimap<std::string, const Function *>::const_iterator it = base->classScope->functionMap.find(name); it != base->classScope->functionMap.end() && it->first == name; ++it) {
4983
+
auto range = base->classScope->functionMap.equal_range(name);
4984
+
for (std::multimap<std::string, const Function*>::const_iterator it = range.first; it != range.second; ++it) {
4980
4985
const Function *func = it->second;
4981
4986
if ((func->isVariadic() && args >= (func->argCount() - 1)) ||
auto addMatchingFunctions = [&](const Scope *scope) {
5120
-
for (std::multimap<std::string, const Function *>::const_iterator it = scope->functionMap.find(tok->str()); it != scope->functionMap.cend() && it->first == tok->str(); ++it) {
5125
+
auto range = scope->functionMap.equal_range(tok->str());
5126
+
for (std::multimap<std::string, const Function *>::const_iterator it = range.first; it != range.second; ++it) {
0 commit comments