#3340 Do not use same variable name twice

This commit is contained in:
Magne Sjaastad
2018-09-07 17:42:51 +02:00
parent 44a07ad596
commit cb218965c5

View File

@@ -130,10 +130,10 @@ void PdmObjectHandle::firstAncestorOrThisOfType(T*& ancestor) const
// Check if this matches the type
const T* objectOfType = dynamic_cast<const T*>(this);
if (objectOfType)
const T* objectOfTypeConst = dynamic_cast<const T*>(this);
if (objectOfTypeConst)
{
ancestor = const_cast<T*>(objectOfType);
ancestor = const_cast<T*>(objectOfTypeConst);
return;
}