Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
Type-OpenVolumeMesh
Commits
d246a675
Commit
d246a675
authored
Jan 13, 2018
by
Martin Heistermann
Browse files
trust object type and avoid dynamic_cast due to cross-library RTTI trouble.
parent
b0d6aaa8
Changes
1
Hide whitespace changes
Inline
Side-by-side
ObjectTypes/PolyhedralMesh/PluginFunctionsPolyhedralMesh.cc
View file @
d246a675
...
...
@@ -108,7 +108,7 @@ bool getObject( int _identifier, PolyhedralMeshObject*& _object ) {
BaseObjectData
*
object
=
0
;
PluginFunctions
::
getObject
(
_identifier
,
object
);
_object
=
dynamic_cast
<
P
olyhedralMeshObject
*
>
(
object
);
_object
=
p
olyhedralMeshObject
(
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
=
dynam
ic_cast
<
PolyhedralMeshObject
*
>
(
_object
);
PolyhedralMeshObject
*
object
=
stat
ic_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
dynam
ic_cast
<
PolyhedralMeshObject
*
>
(
_object
);
return
stat
ic_cast
<
PolyhedralMeshObject
*
>
(
_object
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment