Commit da0b0aff authored by Jan Möbius's avatar Jan Möbius
Browse files

Use if then else instead of switch

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6272 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 510ebf11
...@@ -332,19 +332,16 @@ void MovePlugin::moveObject(ACG::Matrix4x4d mat, int _id) { ...@@ -332,19 +332,16 @@ void MovePlugin::moveObject(ACG::Matrix4x4d mat, int _id) {
if ( ! PluginFunctions::getObject(_id,object) ) if ( ! PluginFunctions::getObject(_id,object) )
return; return;
switch ( object->dataType() ) { if ( object->dataType() == DATA_TRIANGLE_MESH ) {
case DATA_TRIANGLE_MESH:
transformMesh(mat , *PluginFunctions::triMesh(object) ); transformMesh(mat , *PluginFunctions::triMesh(object) );
break; } else if ( object->dataType() == DATA_POLY_MESH ) {
case DATA_POLY_MESH:
transformMesh(mat , *PluginFunctions::polyMesh(object) ); transformMesh(mat , *PluginFunctions::polyMesh(object) );
break;
case DATA_POLY_LINE:
#ifdef ENABLE_POLYLINE_SUPPORT #ifdef ENABLE_POLYLINE_SUPPORT
} else if ( object->dataType() == DATA_POLY_LINE ) {
transformPolyLine(mat , *PluginFunctions::polyLine(object) ); transformPolyLine(mat , *PluginFunctions::polyLine(object) );
#endif #endif
break; } else {
default:
emit log(LOGERR,"moveObject called for unsupported Object Type"); emit log(LOGERR,"moveObject called for unsupported Object Type");
return; return;
} }
......
Supports Markdown
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