App: Replaced freecad_dynamic_cast by static_cast. In this case we know the type, and don't check for 0.

This commit is contained in:
Eivind Kvedalen 2015-12-03 21:37:04 +01:00 committed by wmayer
parent 71605e63ef
commit 4d0af95caf

View File

@ -574,7 +574,7 @@ void ObjectIdentifier::resolve() const
else {
/* Document object name not specified, resolve from path */
if (components.size() == 1) {
documentObjectName = String(freecad_dynamic_cast<DocumentObject>(owner)->getNameInDocument());
documentObjectName = String(static_cast<const DocumentObject*>(owner)->getNameInDocument());
propertyName = components[0].name.getString();
propertyIndex = 0;
}
@ -590,7 +590,7 @@ void ObjectIdentifier::resolve() const
propertyIndex = 1;
}
else {
documentObjectName = String(freecad_dynamic_cast<DocumentObject>(owner)->getNameInDocument());
documentObjectName = String(static_cast<const DocumentObject*>(owner)->getNameInDocument());
propertyName = components[0].name.getString();
propertyIndex = 0;
}