Salome HOME
Merge remote-tracking branch 'remotes/origin/EDF_2020_Lot2'
[modules/shaper.git] / src / CollectionPlugin / CollectionPlugin_Group.cpp
index f45454afa0e75e6c41aab73bfc191e9fcf81b04d..4803dadd754a8c8dc7963f7cdb803d3e42c3bd38 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -137,14 +137,14 @@ bool CollectionPlugin_Group::customAction(const std::string& theActionId)
           }
           aFathers[anAttr->contextObject()] = anObj;
           if (aFatherGroup.find(anObj) == aFatherGroup.end()) {
-            int aSize = aFatherGroup.size();
+            int aSize = (int)aFatherGroup.size();
             aFatherGroup[anObj] = aSize; // the first is zero
           }
         }
       }
-      if (aFatherGroup.size() < aList->size() && aFatherGroup.size() != 1)  // already good
+      if (aFatherGroup.size() < (size_t)aList->size() && aFatherGroup.size() != 1)  // already good
         break;
-      if (aFatherGroup.size() == aList->size()) // no sence to iterate further
+      if (aFatherGroup.size() == (size_t)aList->size()) // no sence to iterate further
         break;
       if (aFatherGroup.size() == 1 && aList->size() > 1 && aCurrentDepth == aMinDepth)
         aSplitAnyway = true;  // split anyway, better that just move
@@ -152,7 +152,6 @@ bool CollectionPlugin_Group::customAction(const std::string& theActionId)
 
     std::set<int> aRemoved;
     bool aStay = false; // to indicate that the good attribute found stays in the list
-    int anIndex = 1; // index of the name assigned to group-feature and result
     // added in the order: 3 2 1 orig=0, so, keep the results to give names later
     std::list<FeaturePtr> aResults;
     for(int aNext = aList->size() - 1; aNext >= 0; aNext--) {
@@ -171,7 +170,7 @@ bool CollectionPlugin_Group::customAction(const std::string& theActionId)
 
       aRemoved.insert(aNext);
       FeaturePtr aNew;
-      if (aSplitAnyway || aFGroup > aResults.size()) {
+      if (aSplitAnyway || aFGroup > (int)aResults.size()) {
         aNew = aDoc->addFeature(ID(), false);
         aResults.push_front(aNew); // to keep the order
       } else { // appending in already created new result