Skip to content

Commit

Permalink
Address reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Aug 22, 2023
1 parent f55d640 commit 2447855
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/symboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4353,13 +4353,12 @@ const Function *Function::getOverriddenFunction(bool *foundAllBaseClasses) const
// prevent recursion if base is the same except for different template parameters
static bool isDerivedFromItself(const std::string& thisName, const std::string& baseName)
{
if (thisName.back() != '>')
return false;
const auto pos = thisName.find('<');
if (pos == std::string::npos)
return false;
const auto posBase = baseName.find('<');
if (posBase != pos)
return false;
return thisName.compare(0, pos, baseName, 0, pos) == 0;
return thisName.compare(0, pos + 1, baseName, 0, pos + 1) == 0;
}

const Function * Function::getOverriddenFunctionRecursive(const ::Type* baseType, bool *foundAllBaseClasses) const
Expand Down

0 comments on commit 2447855

Please sign in to comment.