From 4710eb86ce06f676c67a3cc15d3b41fa21ad2645 Mon Sep 17 00:00:00 2001 From: Nicolas Rechatin Date: Tue, 31 Aug 2021 15:42:01 +0200 Subject: [PATCH] cpplint --- src/ModelAPI/ModelAPI_Tools.cpp | 41 ++++++++++++++++++--------------- src/XGUI/XGUI_Workshop.cpp | 3 ++- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/ModelAPI/ModelAPI_Tools.cpp b/src/ModelAPI/ModelAPI_Tools.cpp index 482d4ac1a..5c4e6eae4 100644 --- a/src/ModelAPI/ModelAPI_Tools.cpp +++ b/src/ModelAPI/ModelAPI_Tools.cpp @@ -17,37 +17,38 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include -#include "ModelAPI_Tools.h" -#include +#include +#include +#include +#include +#include #include #include +#include #include -#include -#include #include +#include +#include #include #include -#include -#include +#include +#include "ModelAPI_Tools.h" #include -#include -#include -#include -#include -#include -#include -#include +#include #include #include -#include -#include #include #include +#include +#include +#include +#include +#include + #define RECURSE_TOP_LEVEL 50 //#define DEBUG_REMOVE_FEATURES @@ -1187,9 +1188,11 @@ void findRandomColor(std::vector& 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; } diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 74731815a..5deed2906 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -2570,7 +2570,8 @@ void XGUI_Workshop::changeAutoColor(const QObjectPtrList& theObjects) std::list >::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); } -- 2.39.2