File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -179,15 +179,15 @@ static bool checkOverrideByDerivedMethod(const CXXMethodDecl *BaseMD,
179179
180180bool VirtualNearMissCheck::isPossibleToBeOverridden (
181181 const CXXMethodDecl *BaseMD) {
182- auto Iter = PossibleMap.find (BaseMD);
183- if (Iter != PossibleMap. end () )
182+ auto [ Iter, Inserted] = PossibleMap.try_emplace (BaseMD);
183+ if (!Inserted )
184184 return Iter->second ;
185185
186186 bool IsPossible = !BaseMD->isImplicit () && !isa<CXXConstructorDecl>(BaseMD) &&
187187 !isa<CXXDestructorDecl>(BaseMD) && BaseMD->isVirtual () &&
188188 !BaseMD->isOverloadedOperator () &&
189189 !isa<CXXConversionDecl>(BaseMD);
190- PossibleMap[BaseMD] = IsPossible;
190+ Iter-> second = IsPossible;
191191 return IsPossible;
192192}
193193
You can’t perform that action at this time.
0 commit comments