Fix spelling of "overridden" in function names.

One 'd' was missing.
This commit is contained in:
Lauri Nurmi 2019-01-14 19:36:21 +02:00 committed by Daniel Marjamäki
parent 6ef8dad459
commit f267900257
3 changed files with 9 additions and 9 deletions

View File

@ -2602,7 +2602,7 @@ void CheckClass::checkOverride()
for (const Function &func : classScope->functionList) {
if (func.hasOverrideSpecifier() || func.hasFinalSpecifier())
continue;
const Function *baseFunc = func.getOverridenFunction();
const Function *baseFunc = func.getOverriddenFunction();
if (baseFunc)
overrideError(baseFunc, &func);
}

View File

@ -3149,23 +3149,23 @@ bool Function::isImplicitlyVirtual(bool defaultVal) const
if (isVirtual())
return true;
bool foundAllBaseClasses = true;
if (getOverridenFunction(&foundAllBaseClasses))
if (getOverriddenFunction(&foundAllBaseClasses))
return true;
if (foundAllBaseClasses)
return false;
return defaultVal;
}
const Function *Function::getOverridenFunction(bool *foundAllBaseClasses) const
const Function *Function::getOverriddenFunction(bool *foundAllBaseClasses) const
{
if (foundAllBaseClasses)
*foundAllBaseClasses = true;
if (!nestedIn->isClassOrStruct())
return nullptr;
return getOverridenFunctionRecursive(nestedIn->definedType, foundAllBaseClasses);
return getOverriddenFunctionRecursive(nestedIn->definedType, foundAllBaseClasses);
}
const Function * Function::getOverridenFunctionRecursive(const ::Type* baseType, bool *foundAllBaseClasses) const
const Function * Function::getOverriddenFunctionRecursive(const ::Type* baseType, bool *foundAllBaseClasses) const
{
// check each base class
for (std::size_t i = 0; i < baseType->derivedFrom.size(); ++i) {
@ -3220,7 +3220,7 @@ const Function * Function::getOverridenFunctionRecursive(const ::Type* baseType,
if (!derivedFromType->derivedFrom.empty() && !derivedFromType->hasCircularDependencies()) {
// avoid endless recursion, see #5289 Crash: Stack overflow in isImplicitlyVirtual_rec when checking SVN and
// #5590 with a loop within the class hierarchy.
const Function *func = getOverridenFunctionRecursive(derivedFromType, foundAllBaseClasses);
const Function *func = getOverriddenFunctionRecursive(derivedFromType, foundAllBaseClasses);
if (func) {
return func;
}

View File

@ -724,7 +724,7 @@ public:
bool isImplicitlyVirtual(bool defaultVal = false) const;
/** @brief get function in base class that is overridden */
const Function *getOverridenFunction(bool *foundAllBaseClasses = nullptr) const;
const Function *getOverriddenFunction(bool *foundAllBaseClasses = nullptr) const;
bool isConstructor() const {
return type==eConstructor ||
@ -852,8 +852,8 @@ public:
const Token * constructorMemberInitialization() const;
private:
/** Recursively determine if this function overrides a virtual method in a base class */
const Function * getOverridenFunctionRecursive(const ::Type* baseType, bool *foundAllBaseClasses) const;
/** Recursively determine if this function overrides a virtual function in a base class */
const Function * getOverriddenFunctionRecursive(const ::Type* baseType, bool *foundAllBaseClasses) const;
unsigned int mFlags;