]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Intégration :
authorNicolas RECHATIN <nicolas.rechatin@cea.fr>
Wed, 16 Jun 2021 12:43:17 +0000 (14:43 +0200)
committerNicolas RECHATIN <nicolas.rechatin@cea.fr>
Wed, 16 Jun 2021 12:43:17 +0000 (14:43 +0200)
    + Lint and code norm

src/FiltersAPI/FiltersAPI_Argument.cpp
src/FiltersAPI/FiltersAPI_Feature.cpp
src/FiltersPlugin/FiltersPlugin_FaceSize.cpp
src/FiltersPlugin/FiltersPlugin_FeatureEdges.cpp
src/FiltersPlugin/FiltersPlugin_VolumeSize.cpp
src/GeomValidators/GeomValidators_Positive.cpp

index 8cc6880bd256dc732a688820996fde426e4bf045..182251e1987e9fb259e4d21e040b3717dfef5324 100644 (file)
@@ -64,10 +64,10 @@ void FiltersAPI_Argument::dump(ModelHighAPI_Dumper& theDumper) const
     theDumper << "model.selection()"; // mySelectionAttr;
   }
   else if (mySelection.variantType() == ModelHighAPI_Selection::VT_Empty) {
-    if (myDouble.value() > -100000000000 ){
+    if (myDouble.value() > -100000000000 ) {
       theDumper << myDouble.value();
     }
-    else if (myValue.empty()){
+    else if (myValue.empty()) {
       theDumper << myBoolean;
     }
     else{
index 9a24140f4c81aabbe126ea80edb7f19e2af971f7..095f4577512b9da32f75b3e5a0f35ac54194a2a9 100644 (file)
@@ -51,7 +51,7 @@ static void separateArguments(const std::list<FiltersAPI_Argument>& theArguments
     else if (anIt->dble().value() > -100000000000) {
       theDoubleArgs.push_back(anIt->dble());
     }
-    else if (anIt->string().empty()){
+    else if (anIt->string().empty()) {
       theBoolArgs.push_back(anIt->boolean());
     }
     else
@@ -108,7 +108,7 @@ void FiltersAPI_Feature::setFilters(const std::list<FilterAPIPtr>& theFilters)
               if (aBoolean) {
                 if (aBools.size() == 1)
                   fillAttribute(aBools.front(), aBoolean);
-              }else {
+              } else {
                 AttributeDoublePtr aDouble =
                     std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(*aFIt);
                 if (aDouble) {
index 52633b8347fd14654a8720c14725bee24cf40d5b..17923ffbaf7f0fe7d601078c3a06bb0c245125ab 100644 (file)
@@ -56,7 +56,7 @@ bool FiltersPlugin_FaceSize::isOk(const GeomShapePtr& theShape, const ResultPtr&
     return false;
   double aValMax = aValue->value();
 
-    if (aVal < 0.0)
+  if (aVal < 0.0)
     return false;
 
   double aTolerance = 0.0001;
@@ -64,12 +64,12 @@ bool FiltersPlugin_FaceSize::isOk(const GeomShapePtr& theShape, const ResultPtr&
   double aSurfArea;
   double aVolume;
   std::string aError;
-  if!GetBasicProperties(theShape,
+  if (!GetBasicProperties(theShape,
                           aTolerance,
                           aLength,
                           aSurfArea,
                           aVolume,
-                          aError) )
+                          aError))
       return false;
 
   anAttr = theArgs.argument("comparatorType");
index 79dd0aa654e56969e40e3626837e73a7c18ffaaa..4b6ad58ccbe2f966f52e9c379c88a2b68b1bef4f 100644 (file)
@@ -77,7 +77,7 @@ static void cacheFeatureEdge(const GeomShapePtr theTopLevelShape,
                                  anEdge->middlePoint(),
                                  theAngle,
                                  anError)) {
-            ifanError.empty())
+            if (anError.empty())
               theCache.insert(anEdge);
           }
         }
index c50b58d91e647fab4fad42847bd3e85399c0d516..32f04d30ff4dffec10b590bfdbbe55b72f2ae2d6 100644 (file)
@@ -46,13 +46,13 @@ bool FiltersPlugin_VolumeSize::isOk(const GeomShapePtr& theShape, const ResultPt
 {
   AttributePtr anAttr = theArgs.argument("value");
   AttributeDoublePtr aValue = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(anAttr);
-  if (!aValue.get()|| !anAttr->isInitialized() )
+  if (!aValue.get()|| !anAttr->isInitialized())
     return false;
   double aVal = aValue->value();
 
   anAttr = theArgs.argument("valueMax");
   aValue = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(anAttr);
-  if (!aValue.get()|| !anAttr->isInitialized() )
+  if (!aValue.get()|| !anAttr->isInitialized())
     return false;
   double aValMax = aValue->value();
 
@@ -64,12 +64,12 @@ bool FiltersPlugin_VolumeSize::isOk(const GeomShapePtr& theShape, const ResultPt
   double aSurfArea;
   double aVolume;
   std::string aError;
-  if!GetBasicProperties(theShape,
+  if (!GetBasicProperties(theShape,
                           aTolerance,
                           aLength,
                           aSurfArea,
                           aVolume,
-                          aError) )
+                          aError))
       return false;
 
   anAttr = theArgs.argument("comparatorType");
index bc352836a520e18f79cceb1c501d21a82371fa67..cfb033f313ae12ac4be49b3fe5709b6ab27859d9 100644 (file)
@@ -45,10 +45,10 @@ bool GeomValidators_Positive::isValid(const AttributePtr& theAttribute,
                                       Events_InfoMessage& theError) const
 {
   double aMinValue = 1.e-12;
-  if(theArguments.size() == 1) {
+  if (theArguments.size() == 1) {
     std::list<std::string>::const_iterator anIt = theArguments.begin();
     double aValue = Config_PropManager::stringToDouble((*anIt).c_str());
-    if(aValue != 0) {
+    if (aValue != 0) {
       // very probably ok
       aMinValue = aValue;
     }