]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketcherPrs/SketcherPrs_PositionMgr.cpp
Salome HOME
updated copyright message
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_PositionMgr.cpp
index 81b5018b76e2865f6d7e45c05d256e8978b8a015..282c68d2fa96366358be4a43fb9e2885ac08d53e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -424,7 +424,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPointPosition(
   gp_Vec aVecPos;
   // If number of angle less then number of symbols then each symbol can be placed
   // directly inside of the angle
-  if (aAngles.size() >= aPos[1] && !aVectors.empty()) {
+  if ((int)aAngles.size() >= aPos[1] && !aVectors.empty()) {
     int aId = aPos[0];
     aVecPos = *(std::next(aVectors.begin(), aId));
 
@@ -439,9 +439,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPointPosition(
   double aAng;
   std::list<double>::const_iterator aItAng;
 
-  double aAngPos;
   bool aHasPlace = false;
-  //int aIntId = 0; // a position inside a one sector
   while (aPosCount < aPos[1]) {
     for (aItAng = aAngles.cbegin(), aItVec = aVectors.cbegin();
          aItAng != aAngles.cend(); ++aItAng, ++aItVec) {
@@ -451,9 +449,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPointPosition(
 
       if ((!aHasPlace) && (aPosCount >= (aPos[0] + 1))) {
         aHasPlace = true;
-        aAngPos = (*aItAng);
         aVecPos = (*aItVec);
-        //aIntId = aPos[0] - (aPosCount - Nb);
       }
     }
     if (aPosCount < aPos[1]) {
@@ -491,10 +487,10 @@ void SketcherPrs_PositionMgr::deleteConstraint(const SketcherPrs_SymbolPrs* theP
         aToDel.push_back(aIt->first);
       else {
         // Reindex objects positions in order to avoid spaces
-        PositionsMap::iterator aIt;
+        PositionsMap::iterator aPMIt;
         int i = 0;
-        for (aIt = aPosMap.begin(); aIt != aPosMap.end(); aIt++, i++)
-          aIt->second = i;
+        for (aPMIt = aPosMap.begin(); aPMIt != aPosMap.end(); aPMIt++, i++)
+          aPMIt->second = i;
       }
     }
   }