Commit d246a675 authored by Martin Heistermann's avatar Martin Heistermann

trust object type and avoid dynamic_cast due to cross-library RTTI trouble.

parent b0d6aaa8
......@@ -108,7 +108,7 @@ bool getObject( int _identifier, PolyhedralMeshObject*& _object ) {
BaseObjectData* object = 0;
PluginFunctions::getObject(_identifier,object);
_object = dynamic_cast< PolyhedralMeshObject* >(object);
_object = polyhedralMeshObject(object);
return ( _object != 0 );
}
......@@ -120,7 +120,7 @@ bool getObject( int _identifier, PolyhedralMeshObject*& _object ) {
PolyhedralMesh* polyhedralMesh( BaseObjectData* _object ) {
if ( _object->dataType(DATA_POLYHEDRAL_MESH) ) {
PolyhedralMeshObject* object = dynamic_cast< PolyhedralMeshObject* >(_object);
PolyhedralMeshObject* object = static_cast< PolyhedralMeshObject* >(_object);
return object->mesh();
} else
return 0;
......@@ -139,7 +139,7 @@ PolyhedralMesh* polyhedralMesh( int _identifier ) {
PolyhedralMeshObject* polyhedralMeshObject( BaseObjectData* _object ) {
if ( ! _object->dataType(DATA_POLYHEDRAL_MESH) )
return 0;
return dynamic_cast< PolyhedralMeshObject* >( _object );
return static_cast< PolyhedralMeshObject* >( _object );
}
......
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