Commit 6c00e987 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

We do not need a cast to get UMLWidget::localID() because it is not a virtual method

CCBUG:403808
parent 366c2e4f
......@@ -1525,7 +1525,7 @@ Uml::ID::Type AssociationWidget::widgetIDForRole(Uml::RoleType::Enum role) const
return Uml::ID::None;
}
if (m_role[role].umlWidget->isObjectWidget())
return static_cast<ObjectWidget*>(m_role[role].umlWidget)->localID();
return m_role[role].umlWidget->localID();
Uml::ID::Type id = m_role[role].umlWidget->id();
return id;
}
......@@ -1544,7 +1544,7 @@ Uml::ID::Type AssociationWidget::widgetLocalIDForRole(Uml::RoleType::Enum role)
return Uml::ID::None;
}
if (m_role[role].umlWidget->isObjectWidget())
return static_cast<ObjectWidget*>(m_role[role].umlWidget)->localID();
return m_role[role].umlWidget->localID();
Uml::ID::Type id = m_role[role].umlWidget->localID();
return id;
}
......
......@@ -44,7 +44,7 @@ namespace Widget_Utils
{
foreach (UMLWidget* obj, widgets) {
if (obj->isObjectWidget()) {
if (static_cast<ObjectWidget *>(obj)->localID() == id)
if (obj->localID() == id)
return obj;
} else if (obj->id() == id) {
return obj;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment