Salome HOME
Get rid of compilation warnings. Part II. MSVC warnings.
[modules/shaper.git] / src / ModuleBase / ModuleBase_OperationFeature.cpp
index 98cbc74403f48ac321af785e2d41a49786e1d947..ab66c3bf621a592a9dc6a1e4f604d40e968c26eb 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
@@ -209,10 +209,10 @@ bool ModuleBase_OperationFeature::hasObject(ObjectPtr theObj) const
         std::shared_ptr<ModelAPI_AttributeRefList> aCurSelList =
                                std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(*anIt);
         for (int i = 0, aNb = aCurSelList->size(); i < aNb && !aFoundObject; i++) {
-          ObjectPtr anObject = aCurSelList->object(i);
-          FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(anObject);
-          if (aFeature.get()) {
-            aFoundObject = anObjectFeature == aFeature;
+          ObjectPtr aCurObj = aCurSelList->object(i);
+          FeaturePtr aCurFeat = std::dynamic_pointer_cast<ModelAPI_Feature>(aCurObj);
+          if (aCurFeat.get()) {
+            aFoundObject = anObjectFeature == aCurFeat;
           }
         }
       }
@@ -393,20 +393,16 @@ ModuleBase_ModelWidget* ModuleBase_OperationFeature::activateByPreselection(
         }
       }
       else {
-        bool isSet = false;
         // 1. apply the selection to controls
         for (aWIt = aWidgets.constBegin(); aWIt != aWidgets.constEnd(); ++aWIt) {
           aWgt = (*aWIt);
           if (!aWgt->canAcceptFocus())
             continue;
           aPropertyPanel->setPreselectionWidget(aWgt);
-          if (myPreSelection.empty() || !aWgt->setSelection(myPreSelection, true)) {
-            isSet = false;
+          if (myPreSelection.empty() || !aWgt->setSelection(myPreSelection, true))
             break;
-          } else {
-            isSet = true;
+          else
             aFilledWgt = aWgt;
-          }
         }
       }
       aPropertyPanel->setPreselectionWidget(NULL);