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

Fixed cppcheck warnings

parent 25c922d0
......@@ -123,8 +123,6 @@ slot_smooth()
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS,DATA_TRIANGLE_MESH) ;
o_it != PluginFunctions::objectsEnd(); ++o_it) {
QString jobDescription = "Smoothed (";
TriMeshObject* object = PluginFunctions::triMeshObject(*o_it);
......@@ -156,13 +154,10 @@ slot_smooth()
OpenMesh::Smoother::SmootherT< TriMesh >::Component component = OpenMesh::Smoother::SmootherT< TriMesh >::Tangential_and_Normal;
if( tool_->rbTangential_and_Normal->isChecked() ) {
component = OpenMesh::Smoother::SmootherT< TriMesh >::Tangential_and_Normal;
jobDescription += "tangential and normal,";
} else if( tool_->rbNormal->isChecked() ) {
component = OpenMesh::Smoother::SmootherT< TriMesh >::Normal;
jobDescription += "normal,";
} else if( tool_->rbTangential->isChecked() ) {
component = OpenMesh::Smoother::SmootherT< TriMesh >::Tangential;
jobDescription += "tangential,";
}
// Set perObjectData
......@@ -171,10 +166,8 @@ slot_smooth()
OpenMesh::Smoother::SmootherT< TriMesh >::Continuity continuity = OpenMesh::Smoother::SmootherT< TriMesh >::C0;
if( tool_->rB_c0->isChecked() ) {
continuity = OpenMesh::Smoother::SmootherT< TriMesh >::C0;
jobDescription += "C0";
} else if( tool_->rB_c1->isChecked() ) {
continuity = OpenMesh::Smoother::SmootherT< TriMesh >::C1;
jobDescription += "C1";
}
// Set perObjectData
......@@ -195,7 +188,6 @@ slot_smooth()
emit log(LOGWARN , "Unable to read distance error from LineEdit");
}
jobDescription += ",max_error: " + QString::number(absoluteError);
}
// Set perObjectData
......@@ -213,8 +205,6 @@ slot_smooth()
smoother.skip_features(data->features());
smoother.smooth( data->iterations() );
jobDescription += ") " + QString::number(tool_->sB_iter->value()) + " iterations";
mesh->update_normals();
......@@ -240,8 +230,6 @@ void SmootherPlugin::smooth(int _objectId , int _iterations , QString _direction
if ( baseObjectData->dataType() == DATA_TRIANGLE_MESH ) {
TriMeshObject* object = PluginFunctions::triMeshObject(baseObjectData);
QString jobDescription = "Smoothed (";
if ( object == 0 ) {
emit log(LOGWARN , "Unable to get object ( Only Triangle Meshes supported)");
......@@ -271,13 +259,10 @@ void SmootherPlugin::smooth(int _objectId , int _iterations , QString _direction
if ( tangential && normal ) {
component = OpenMesh::Smoother::SmootherT< TriMesh >::Tangential_and_Normal;
jobDescription += "tangential and normal,";
} else if ( tangential ) {
component = OpenMesh::Smoother::SmootherT< TriMesh >::Tangential;
jobDescription += "normal,";
} else {
component = OpenMesh::Smoother::SmootherT< TriMesh >::Normal;
jobDescription += "tangential,";
}
// Set perObjectData
......@@ -291,10 +276,8 @@ void SmootherPlugin::smooth(int _objectId , int _iterations , QString _direction
std::cerr << "Continuity C0 + C1 ? Using C1" << std::endl;
if( c1 ) {
continuity = OpenMesh::Smoother::SmootherT< TriMesh >::C1;
jobDescription += "C1";
} else if( c0 ) {
continuity = OpenMesh::Smoother::SmootherT< TriMesh >::C0;
jobDescription += "C0";
}
// Set perObjectData
......@@ -304,7 +287,6 @@ void SmootherPlugin::smooth(int _objectId , int _iterations , QString _direction
// Set perObjectData
data->distance(_maxDistance);
smoother.set_absolute_local_error( _maxDistance );
jobDescription += ",max_error: " + QString::number(_maxDistance);
} else {
// Set perObjectData
data->distance( FLT_MAX );
......@@ -319,8 +301,6 @@ void SmootherPlugin::smooth(int _objectId , int _iterations , QString _direction
smoother.smooth( _iterations );
jobDescription += ") " + QString::number(_iterations) + " iterations";
mesh->update_normals();
emit updatedObject( object->id(), UPDATE_GEOMETRY );
......
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