]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
cpplint
authorNicolas Rechatin <nicolas.rechatin@cea.fr>
Tue, 31 Aug 2021 13:42:01 +0000 (15:42 +0200)
committerNicolas Rechatin <nicolas.rechatin@cea.fr>
Tue, 31 Aug 2021 13:42:01 +0000 (15:42 +0200)
src/ModelAPI/ModelAPI_Tools.cpp
src/XGUI/XGUI_Workshop.cpp

index 482d4ac1a047376fa76cea478154691ec1fc5691..5c4e6eae4aa80da42edc8351203380816712453a 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include <algorithm>
 
-#include "ModelAPI_Tools.h"
-#include <ModelAPI_Session.h>
+#include <ModelAPI_AttributeBoolean.h>
+#include <ModelAPI_AttributeDocRef.h>
+#include <ModelAPI_AttributeDouble.h>
+#include <ModelAPI_AttributeIntArray.h>
+#include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_CompositeFeature.h>
 #include <ModelAPI_Document.h>
+#include <ModelAPI_Events.h>
 #include <ModelAPI_Object.h>
-#include <ModelAPI_AttributeDouble.h>
-#include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_ResultBody.h>
+#include <ModelAPI_ResultConstruction.h>
+#include <ModelAPI_ResultGroup.h>
 #include <ModelAPI_ResultParameter.h>
 #include <ModelAPI_ResultPart.h>
-#include <ModelAPI_ResultGroup.h>
-#include <ModelAPI_AttributeDocRef.h>
+#include <ModelAPI_Session.h>
+#include "ModelAPI_Tools.h"
 #include <ModelAPI_Validator.h>
-#include <ModelAPI_AttributeIntArray.h>
-#include <ModelAPI_ResultConstruction.h>
-#include <ModelAPI_AttributeBoolean.h>
-#include <list>
-#include <map>
-#include <iostream>
-#include <sstream>
 
+#include <Config_Translator.h>
 #include <Events_Loop.h>
 #include <Locale_Convert.h>
-#include <ModelAPI_Events.h>
-#include <Config_Translator.h>
 
 #include <GeomAPI_ShapeHierarchy.h>
 #include <GeomAPI_ShapeIterator.h>
 
+#include <algorithm>
+#include <iostream>
+#include <list>
+#include <map>
+#include <sstream>
+
 #define RECURSE_TOP_LEVEL 50
 
 //#define DEBUG_REMOVE_FEATURES
@@ -1187,9 +1188,11 @@ void findRandomColor(std::vector<int>& theValues)
         aHSVColor = {rand() % 360 , rand()%(100 - 75 + 1) + 60, rand()%(100 - 60 + 1) + 75};
         aRGBColor = HSVtoRGB(aHSVColor[0], aHSVColor[1], aHSVColor[2]);
         timeout++;
-      } while (timeout < 20 &&
-               std::find(usedGeneratedColor.begin(), usedGeneratedColor.end(), aHSVColor) != usedGeneratedColor.end() &&
-               std::find(myColorTab.begin(), myColorTab.end(), aRGBColor) != myColorTab.end());
+      } while (
+        timeout < 20 &&
+        std::find(usedGeneratedColor.begin(), usedGeneratedColor.end(), aHSVColor)
+        != usedGeneratedColor.end() &&
+        std::find(myColorTab.begin(), myColorTab.end(), aRGBColor) != myColorTab.end());
       usedGeneratedColor.push_back(aHSVColor);
       theValues = aRGBColor;
   }
index 74731815a06228844bc8556de3583ad3ce7ebee4..5deed290641b3472598c783bd251d9abf561af1e 100644 (file)
@@ -2570,7 +2570,8 @@ void XGUI_Workshop::changeAutoColor(const QObjectPtrList& theObjects)
             std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aIt;
             for (aIt = aResults.cbegin(); aIt != aResults.cend(); aIt++) {
               ResultPtr aGroupResult = *aIt;
-              if (aGroupResult.get() && aGroupResult->groupName() == ModelAPI_ResultGroup::group()) {
+              if (aGroupResult.get() &&
+                  aGroupResult->groupName() == ModelAPI_ResultGroup::group()) {
                 ModelAPI_Tools::findRandomColor(aColor);
                 ModelAPI_Tools::setColor(aGroupResult, aColor);
               }