Salome HOME
fight warnings, c++17. additional corrections++
[modules/smesh.git] / src / SMESH / SMESH_MeshEditor.cxx
index 449831b4b7d149bbde5fa9cfcf5de3fbf600a356..8d6353fd67ff764c208ff1a4da04101e80ffd63b 100644 (file)
@@ -3843,9 +3843,9 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet &          theElems,
           }
           else {
             if ( isUPeriodic )
-              newUV.SetX( ElCLib::InPeriod( newUV.X(), u1, u2 ));
+              newUV.SetX( ElCLib::InPeriod( newUV.X(), u1, u2 )); // todo: u may be used unitialized
             if ( isVPeriodic )
-              newUV.SetY( ElCLib::InPeriod( newUV.Y(), v1, v2 ));
+              newUV.SetY( ElCLib::InPeriod( newUV.Y(), v1, v2 )); // todo: v may be used unitialized
             // check new UV
             // if ( posType != SMDS_TOP_3DSPACE )
             //   dist2 = pNode.SquareDistance( surface->Value( newUV.X(), newUV.Y() ));
@@ -6056,6 +6056,7 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet     theElements[2],
       if ( nbEdges > 0 )
         break;
     }
+    // fall through
     default:
     {
       for ( int di = -1; di <= 1; di += 2 )
@@ -7446,6 +7447,7 @@ public:
   //int& GroupID() const { return const_cast< int& >( myGroupID ); }
 
   ComparableElement( const ComparableElement& theSource ) // move copy
+  : boost::container::flat_set< int >()
   {
     ComparableElement& src = const_cast< ComparableElement& >( theSource );
     (int_set&) (*this ) = boost::move( src );
@@ -10184,7 +10186,7 @@ namespace // automatically find theAffectedElems for DoubleNodes()
         if ( SMESH_MeshAlgos::FaceNormal( _elems[1], norm ))
           avgNorm += norm;
 
-        gp_XYZ bordDir( SMESH_NodeXYZ( _nodes[0] ) - SMESH_NodeXYZ( _nodes[1] ));
+        gp_XYZ bordDir( SMESH_NodeXYZ( _nodes[0] ) - SMESH_NodeXYZ( _nodes[1] )); // todo: compiler complains about zero-size array
         norm = bordDir ^ avgNorm;
       }
       else
@@ -11031,7 +11033,7 @@ double SMESH_MeshEditor::OrientedAngle(const gp_Pnt& p0, const gp_Pnt& p1, const
   try {
     return n2.AngleWithRef(n1, vref);
   }
-  catch ( Standard_Failure ) {
+  catch ( Standard_Failure& ) {
   }
   return Max( v1.Magnitude(), v2.Magnitude() );
 }