Salome HOME
#18963 Minimize compiler warnings (finish)
authoreap <eap@opencascade.com>
Thu, 10 Dec 2020 09:09:02 +0000 (12:09 +0300)
committereap <eap@opencascade.com>
Thu, 10 Dec 2020 09:09:02 +0000 (12:09 +0300)
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx

index e7529a3dff117ab4a6e2acb3509ad41da060ce21..eaa9178efe6f7ded80ca9193fae7dac097c22c6e 100644 (file)
@@ -621,7 +621,7 @@ void BLSURFPlugin_BLSURF::createEnforcedVertexOnFace(TopoDS_Shape faceShape, BLS
 /////////////////////////////////////////////////////////
 void createAttractorOnFace(TopoDS_Shape GeomShape, std::string AttractorFunction, double defaultSize)
 {
-  double xa=0., ya=0., za=0.; // Coordinates of attractor point     // todo: xa, ya, za must be explicitly initialized to avoid warning (see below)
+  double xa=0., ya=0., za=0.; // Coordinates of attractor point
   double a, b;       // Attractor parameter
   double d = 0.;
   bool createNode=false; // To create a node on attractor projection
@@ -678,7 +678,7 @@ void createAttractorOnFace(TopoDS_Shape GeomShape, std::string AttractorFunction
   }
 
   // Get the (u,v) values of the attractor on the face
-  projectionPoint myPoint = getProjectionPoint(TopoDS::Face(GeomShape),gp_Pnt(xa,ya,za)); // todo: xa, ya, za must be explicitly initialized to avoid warning (see above)
+  projectionPoint myPoint = getProjectionPoint(TopoDS::Face(GeomShape),gp_Pnt(xa,ya,za));
   gp_XY uvPoint = myPoint.uv;
   gp_XYZ xyzPoint = myPoint.xyz;
   Standard_Real u0 = uvPoint.X();
index f45af8a4bd1d8151a7f97ebb3fc3a17c6afdf273..db551c4dfb3640e72925dd8156a2c4434ce22fba 100644 (file)
@@ -1650,8 +1650,9 @@ BLSURFPlugin_Hypothesis::TEnfVertex* BLSURFPlugin_Hypothesis::GetEnfVertex(const
 //function : ClearEnforcedVertex
 //=======================================================================
 
-bool BLSURFPlugin_Hypothesis::ClearEnforcedVertex(const TEntry& theFaceEntry, double x, double y, double z,
-                                                 const TEntry& theVertexEntry)
+bool BLSURFPlugin_Hypothesis::ClearEnforcedVertex(const TEntry& theFaceEntry,
+                                                  double x, double y, double z,
+                                                  const TEntry& theVertexEntry)
 {
   bool toNotify = false;
   std::ostringstream msg;
@@ -2477,7 +2478,7 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
 
   isOK = static_cast<bool>(load >> option_or_sm);
   if (isOK) {
-    if ( (option_or_sm == "1")||(option_or_sm == "0") ) {
+    if (( option_or_sm == "1" ) || ( option_or_sm == "0" )) {
       i = atoi(option_or_sm.c_str());
       hasCADSurfOptions = true;
       _phySizeRel = (bool) i;
index 557a8826a9fa5585f916ec1b140ef5dd09f2f0d6..4fb63f657d0d3e49c77b5779e86a243e24d68041 100644 (file)
@@ -1977,7 +1977,6 @@ char* BLSURFPlugin_Hypothesis_i::GetAttractorEntry(const char* entry) {
 // // TODO coder cette fonction (utilis??e pour savoir si la valeur a chang??
 // // A finir pour le dump
 // char* BLSURFPlugin_Hypothesis_i::GetClassAttractorEntry(const char* entry)
-// 
 // {
 //   ASSERT(myBaseImpl);
 //   try {
@@ -2061,7 +2060,7 @@ BLSURFPlugin::TAttParamsMap* BLSURFPlugin_Hypothesis_i::GetAttractorParams()
   for ( int i = 0 ; atIt != attractors.end(); ++atIt, ++i ) {
     string faceEntry = atIt->first;
     string attEntry;
-    double startSize=0., endSize=0., infDist=0., constDist=0.; // todo: startSize, endSize, infDist, constDist must be explicitly initialized to avoid warning (see below)
+    double startSize=0., endSize=0., infDist=0., constDist=0.;
     if ( !atIt->second->Empty() ) {
       attEntry = atIt->second->GetAttractorEntry();
       std::vector<double> params = atIt->second->GetParameters();
@@ -2075,7 +2074,7 @@ BLSURFPlugin::TAttParamsMap* BLSURFPlugin_Hypothesis_i::GetAttractorParams()
     result[i].startSize = startSize;
     result[i].endSize = endSize;
     result[i].infDist = infDist;
-    result[i].constDist = constDist; // todo: startSize, endSize, infDist, constDist must be explicitly initialized to avoid warning (see above)
+    result[i].constDist = constDist;
   }
   return result._retn();
 }