]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Get rid of compilation warnings. Part II. MSVC warnings.
authorArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Sat, 16 May 2020 21:11:54 +0000 (00:11 +0300)
committerArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Sat, 16 May 2020 21:34:42 +0000 (00:34 +0300)
150 files changed:
src/BuildPlugin/BuildPlugin_Solid.cpp
src/BuildPlugin/BuildPlugin_Validators.cpp
src/BuildPlugin/BuildPlugin_Wire.cpp
src/CollectionAPI/CollectionAPI.i
src/CollectionPlugin/CollectionPlugin_Validators.cpp
src/CollectionPlugin/CollectionPlugin_WidgetField.cpp
src/Config/Config_Common.cpp
src/Config/Config_DataModelReader.cpp
src/Config/Config_FeatureMessage.cpp
src/Config/Config_FeatureReader.cpp
src/Config/Config_ValidatorReader.cpp
src/Config/Config_WidgetReader.cpp
src/Config/Config_XMLReader.cpp
src/Config/Config_swig.h
src/ConstructionPlugin/ConstructionPlugin_Point.cpp
src/Events/Events.i
src/ExchangeAPI/ExchangeAPI_Export.cpp
src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp
src/ExchangePlugin/ExchangePlugin_ExportPart.cpp
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp
src/ExchangePlugin/ExchangePlugin_Validators.cpp
src/FeaturesPlugin/FeaturesPlugin_BooleanSmash.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp
src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp
src/FeaturesPlugin/FeaturesPlugin_Pipe.cpp
src/FeaturesPlugin/FeaturesPlugin_ValidatorTransform.cpp
src/FeaturesPlugin/FeaturesPlugin_Validators.cpp
src/FeaturesPlugin/FeaturesPlugin_VersionedChFi.cpp
src/FiltersPlugin/FiltersPlugin_BelongsTo.cpp
src/FiltersPlugin/FiltersPlugin_ExternalFaces.cpp
src/FiltersPlugin/FiltersPlugin_HorizontalFace.cpp
src/FiltersPlugin/FiltersPlugin_OnGeometry.cpp
src/FiltersPlugin/FiltersPlugin_OnPlane.cpp
src/FiltersPlugin/FiltersPlugin_OnPlaneSide.cpp
src/FiltersPlugin/FiltersPlugin_Validators.cpp
src/FiltersPlugin/FiltersPlugin_VerticalFace.cpp
src/GeomAPI/GeomAPI_AISObject.cpp
src/GeomAPI/GeomAPI_Shape.cpp
src/GeomAPI/GeomAPI_swig.h
src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp
src/GeomAlgoAPI/GeomAlgoAPI_MakeShapeList.cpp
src/GeomAlgoAPI/GeomAlgoAPI_MakeShapeList.h
src/GeomAlgoAPI/GeomAlgoAPI_Placement.cpp
src/GeomAlgoAPI/GeomAlgoAPI_STEPExport.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.h
src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_WireBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_swig.h
src/GeomValidators/GeomValidators_ConstructionComposite.cpp
src/GeomValidators/GeomValidators_DifferentShapes.cpp
src/GeomValidators/GeomValidators_Finite.cpp
src/GeomValidators/GeomValidators_ShapeType.cpp
src/GeomValidators/GeomValidators_ZeroOffset.cpp
src/Model/Model_AttributeSelection.cpp
src/Model/Model_AttributeSelectionList.cpp
src/Model/Model_AttributeTables.cpp
src/Model/Model_AttributeValidator.cpp
src/Model/Model_Data.cpp
src/Model/Model_Document.cpp
src/Model/Model_FeatureValidator.cpp
src/Model/Model_Objects.cpp
src/Model/Model_ResultBody.cpp
src/Model/Model_ResultConstruction.cpp
src/Model/Model_Session.cpp
src/Model/Model_Update.cpp
src/ModelAPI/ModelAPI_Feature.cpp
src/ModelAPI/ModelAPI_Feature.h
src/ModelAPI/ModelAPI_Filter.h
src/ModelAPI/ModelAPI_Object.cpp
src/ModelAPI/ModelAPI_Object.h
src/ModelAPI/ModelAPI_Result.cpp
src/ModelAPI/ModelAPI_ResultGroup.h
src/ModelAPI/ModelAPI_Tools.cpp
src/ModelHighAPI/ModelHighAPI.i
src/ModelHighAPI/ModelHighAPI_Dumper.cpp
src/ModelHighAPI/ModelHighAPI_Dumper.h
src/ModelHighAPI/ModelHighAPI_Interface.h
src/ModelHighAPI/ModelHighAPI_Services.cpp
src/ModelHighAPI/ModelHighAPI_Tools.cpp
src/ModelHighAPI/ModelHighAPI_swig.h
src/ModuleBase/ModuleBase_ActionInfo.cpp
src/ModuleBase/ModuleBase_BRepOwner.h
src/ModuleBase/ModuleBase_IModule.h
src/ModuleBase/ModuleBase_ISelection.cpp
src/ModuleBase/ModuleBase_ITreeNode.h
src/ModuleBase/ModuleBase_IWidgetCreator.h
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_Operation.cpp
src/ModuleBase/ModuleBase_OperationFeature.cpp
src/ModuleBase/ModuleBase_PagedContainer.cpp
src/ModuleBase/ModuleBase_ParamSpinBox.h
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/ModuleBase/ModuleBase_SelectionValidator.cpp
src/ModuleBase/ModuleBase_Tools.cpp
src/ModuleBase/ModuleBase_WidgetConcealedObjects.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp
src/ModuleBase/ModuleBase_WidgetSelector.cpp
src/ModuleBase/ModuleBase_WidgetValidated.cpp
src/ModuleBase/ModuleBase_WidgetValidator.h
src/ParametersPlugin/ParametersPlugin_Parameter.cpp
src/ParametersPlugin/ParametersPlugin_Validators.cpp
src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp
src/PartSet/PartSet_CenterPrs.cpp
src/PartSet/PartSet_ExternalObjectsMgr.cpp
src/PartSet/PartSet_FieldStepPrs.cpp
src/PartSet/PartSet_MenuMgr.cpp
src/PartSet/PartSet_MouseProcessor.h
src/PartSet/PartSet_OperationPrs.cpp
src/PartSet/PartSet_OverconstraintListener.cpp
src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_SketcherReentrantMgr.cpp
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_TreeNodes.cpp
src/PartSet/PartSet_Validators.cpp
src/PartSet/PartSet_WidgetSketchCreator.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PartSetPlugin/PartSetPlugin_Part.cpp
src/Selector/Selector_Primitive.cpp
src/SketchAPI/SketchAPI_Sketch.cpp
src/SketchPlugin/SketchPlugin_BSplineBase.cpp
src/SketchPlugin/SketchPlugin_MacroArc.cpp
src/SketchPlugin/SketchPlugin_MacroCircle.cpp
src/SketchPlugin/SketchPlugin_MacroEllipticArc.cpp
src/SketchPlugin/SketchPlugin_MultiRotation.cpp
src/SketchPlugin/SketchPlugin_Projection.cpp
src/SketchPlugin/SketchPlugin_SketchCopy.cpp
src/SketchPlugin/SketchPlugin_Split.cpp
src/SketchPlugin/SketchPlugin_Tools.cpp
src/SketchPlugin/SketchPlugin_Trim.cpp
src/SketchPlugin/SketchPlugin_Validators.cpp
src/SketcherPrs/SketcherPrs_Coincident.cpp
src/SketcherPrs/SketcherPrs_PositionMgr.cpp
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp
src/SketcherPrs/SketcherPrs_SymbolPrs.h
src/XAO/XAO_XaoExporter.cxx
src/XGUI/XGUI_ActionsMgr.cpp
src/XGUI/XGUI_ContextMenuMgr.cpp
src/XGUI/XGUI_DataModel.cpp
src/XGUI/XGUI_Displayer.cpp
src/XGUI/XGUI_FacesPanel.cpp
src/XGUI/XGUI_ObjectsBrowser.cpp
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_PropertyPanel.cpp
src/XGUI/XGUI_Selection.cpp
src/XGUI/XGUI_SelectionMgr.cpp
src/XGUI/XGUI_TransparencyWidget.cpp
src/XGUI/XGUI_Workshop.cpp

index fc6d99f519078958e2eb08de4deeac2d24218780..cd1cb0c863be282f3017761c48f8de3f1f5ae4c5 100644 (file)
@@ -57,10 +57,7 @@ GeomShapePtr BuildPlugin_Solid::getSingleSubshape(const GeomShapePtr& theCompoun
 {
   if (theCompound->shapeType() == GeomAPI_Shape::COMPOUND) {
     GeomAPI_ShapeIterator anIt(theCompound);
-    GeomShapePtr aFoundSub;
-    for (; anIt.more() && !aFoundSub; anIt.next()) {
-      return anIt.current();
-    }
+    return anIt.current();
   }
   return theCompound;
 }
index 78f8e6c9d7960d9b2b2ddc1442c8e8945c1d24b3..ac454e620fd03348cf9162e682171fb8320e2fda 100644 (file)
@@ -460,8 +460,8 @@ bool BuildPlugin_ValidatorSubShapesSelection::isValid(const AttributePtr& theAtt
 
 //=================================================================================================
 bool BuildPlugin_ValidatorFillingSelection::isValid(const AttributePtr& theAttribute,
-                                                      const std::list<std::string>& theArguments,
-                                                      Events_InfoMessage& theError) const
+                                                    const std::list<std::string>& /*theArguments*/,
+                                                    Events_InfoMessage& theError) const
 {
   // Get base objects list.
   if (theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) {
index 7f10590d93fbf3e2c22b4b221281ed2e8a2a1253..124a03abb68051ccad3c3d8ee105f8d2609af01e 100644 (file)
@@ -144,9 +144,9 @@ void BuildPlugin_Wire::execute()
 
     for (ListOfShape::iterator aWIt = aWires.begin(); aWIt != aWires.end(); ++aWIt) {
       ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
-      ListOfShape aSketches;
-      aSketches.push_back(anIt->second);
-      aResultBody->storeModified(aSketches, *aWIt, aMakeShapeList);
+      ListOfShape aSketch;
+      aSketch.push_back(anIt->second);
+      aResultBody->storeModified(aSketch, *aWIt, aMakeShapeList);
       aResultBody->loadModifiedShapes(aMakeShapeList, anIt->second, GeomAPI_Shape::EDGE);
       setResult(aResultBody, aResultIndex);
       ++aResultIndex;
index 99a3dfd995747490d7a8a4eee5d091648624c169..055cc22aa0f15433c1a06022c8e873dd6ded0b3c 100644 (file)
   #include "CollectionAPI_Field.h"
 
 #endif // CollectionAPI_swig_H_
-%}
-
-%{
-  #include "ModelHighAPI_swig.h"
 
   // fix for SWIG v2.0.4
   #define SWIGPY_SLICE_ARG(obj) ((PyObject*)(obj))
index 527b61c8d49a1e4914dd71eff8e8205d24671897..cf55ae31c59c0b63477e7927e9c2f3d425e6c7b0 100644 (file)
@@ -26,7 +26,7 @@
 
 
 bool CollectionPlugin_FieldValidator::isValid(const FeaturePtr& theFeature,
-  const std::list<std::string>& theArguments,
+  const std::list<std::string>& /*theArguments*/,
   Events_InfoMessage& theError) const
 {
   AttributeSelectionListPtr aSelList =
index ea1abe7b7a6c255939c43cbeb1c615ca579efe8d..adf20b11da7b8ea830baea0fa6fc5d1d6a2cc9be 100644 (file)
@@ -598,9 +598,9 @@ bool CollectionPlugin_WidgetField::restoreValueCustom()
       }
     }
     // Restore columns width
-    for (int i = 0; i < aTable->columnCount(); i++) {
-      if (i < aColWidth.size())
-        aTable->setColumnWidth(i, aColWidth.at(i));
+    for (int col = 0; col < aTable->columnCount(); col++) {
+      if (col < aColWidth.size())
+        aTable->setColumnWidth(col, aColWidth.at(col));
     }
 
     aTable->blockSignals(isBlocked);
index efa0efeb99726fb408231d61b24ac289953f1c37..1e25343d98278fb8b51dca6f804ea85b29504735 100644 (file)
@@ -208,7 +208,7 @@ bool getParametersInfo(xmlNodePtr theNode, std::string& outPropertyId,
     std::stringstream aPropStringStream(aPropString);
     char COMMA_DELIM = ',';
     std::string aParameter;
-    while (std::getline(aPropStringStream, aParameter, ',')) {
+    while (std::getline(aPropStringStream, aParameter, COMMA_DELIM)) {
       outValidatorParameters.push_back(aParameter);
     }
   }
@@ -285,6 +285,7 @@ bool getBooleanAttribute(xmlNodePtr theNode, const char* theAttributeName, bool
 CONFIG_EXPORT std::string normalize(const std::string& theString)
 {
   std::string result = theString;
-  std::transform(result.begin(), result.end(), result.begin(), ::tolower);
+  std::transform(result.begin(), result.end(), result.begin(),
+                 [](char c) { return static_cast<char>(::tolower(c)); });
   return result;
 }
index bba44d440edf4e1e544b506b08debe836ddce8e8..55bb37612687ba80302a194544ff59a4d1befe6b 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <Events_InfoMessage.h>
 
+#include <algorithm>
+
 // used only for GUI xml data reading
 // LCOV_EXCL_START
 Config_DataModelReader::Config_DataModelReader()
@@ -46,10 +48,9 @@ void Config_DataModelReader::processNode(xmlNodePtr theNode)
     std::string aIcon = getProperty(theNode, NODE_ICON);
     std::string aEmpty = getProperty(theNode, SHOW_EMPTY);
     std::string aFeatures = getProperty(theNode, FOLDER_FEATURES);
-    std::string::iterator aIt;
-    for (aIt = aEmpty.begin(); aIt != aEmpty.end(); aIt++) {
-      (*aIt) = toupper(*aIt);
-    }
+
+    std::transform(aEmpty.begin(), aEmpty.end(), aEmpty.begin(),
+                   [](char c) { return static_cast<char>(::toupper(c)); });
     bool aIsEmpty = (aEmpty == "FALSE")? false : true;
 
    if (isRootReading) {
@@ -72,10 +73,8 @@ void Config_DataModelReader::processNode(xmlNodePtr theNode)
     isRootReading = false;
     mySubTypes = getProperty(theNode, GROUP_TYPE);
     std::string isResult = getProperty(theNode, LINK_ITEM);
-    std::string::iterator aIt;
-    for (aIt = isResult.begin(); aIt != isResult.end(); aIt++) {
-      (*aIt) = toupper(*aIt);
-    }
+    std::transform(isResult.begin(), isResult.end(), isResult.begin(),
+                   [](char c) { return static_cast<char>(::toupper(c)); });
     myIsResultLink = (isResult == "TRUE")? true : false;
   }
 }
index 22ece8357d3d0007e99a099da89a941375cfbf94..5e2d25c70a6d6939f2904d9d3d9b24fa28feae8c 100644 (file)
@@ -144,9 +144,9 @@ const std::string& Config_FeatureMessage::pluginLibrary() const
   return myPluginLibrary;
 }
 
-void Config_FeatureMessage::setPluginLibrary(const std::string& myPluginLibrary)
+void Config_FeatureMessage::setPluginLibrary(const std::string& thePluginLibrary)
 {
-  this->myPluginLibrary = myPluginLibrary;
+  this->myPluginLibrary = thePluginLibrary;
 }
 
 // LCOV_EXCL_START
index f74f3aea58517fced8289574a1204f7da402cb48..61c2ec179c8aa9f08260d99c9b6ea7138c8fb5e9 100644 (file)
@@ -99,7 +99,7 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
           std::string aCaseNodeID = getProperty(aCaseNode, _ID);
           std::string aSwitchNodeID = "";
           const xmlChar* aName = aCaseNode->name;
-          xmlNodePtr aSwitchNode;
+          xmlNodePtr aSwitchNode = 0;
           if (!xmlStrcmp(aName, (const xmlChar *) WDG_SWITCH_CASE)) {
             aSwitchNode = hasParentRecursive(aCaseNode, WDG_SWITCH, NULL);
           }
index 67516e19484ddc56318717ab7639f5e650fc629b..e15dfb2ad09f875f36dca575681386a20c82afe3 100644 (file)
@@ -68,7 +68,7 @@ void Config_ValidatorReader::cleanup(xmlNodePtr theNode)
   }
 }
 
-bool Config_ValidatorReader::processChildren(xmlNodePtr aNode)
+bool Config_ValidatorReader::processChildren(xmlNodePtr /*aNode*/)
 {
   return true;
 }
index 2c0bf1a290a8d9036e5c1edd3795065c00f23cfa..f4fe27432f6bd755f10b9aae686d8ee73720b4e8 100644 (file)
@@ -107,7 +107,10 @@ std::string Config_WidgetReader::dumpNode(xmlNodePtr theNode)
     std::string anOwnPanel = getProperty(theNode, PROPERTY_PANEL_ID);
     if (!anOwnPanel.empty()) {
       xmlBufferPtr buffer = xmlBufferCreate();
-      int size = xmlNodeDump(buffer, theNode->doc, theNode, 0, 0);
+#ifdef _DEBUG
+      int size =
+#endif
+        xmlNodeDump(buffer, theNode->doc, theNode, 0, 0);
       result = std::string((char*) (buffer->content));
       xmlBufferFree(buffer);
     }
@@ -116,7 +119,10 @@ std::string Config_WidgetReader::dumpNode(xmlNodePtr theNode)
   //Replace all "source" nodes with content;
   resolveSourceNodes(theNode);
   xmlBufferPtr buffer = xmlBufferCreate();
-  int size = xmlNodeDump(buffer, theNode->doc, theNode, 0, 0);
+#ifdef _DEBUG
+  int size =
+#endif
+    xmlNodeDump(buffer, theNode->doc, theNode, 0, 0);
   result = std::string((char*) (buffer->content));
   xmlBufferFree(buffer);
   return result;
index 8f15e0f255eeccec4d11ac16e1b29045ad75932b..8cba8cd4d0f040ece44e75023627a1d9bf67876d 100644 (file)
@@ -203,7 +203,7 @@ void Config_XMLReader::cleanup(xmlNodePtr)
 }
 
 // LCOV_EXCL_START
-bool Config_XMLReader::processChildren(xmlNodePtr aNode)
+bool Config_XMLReader::processChildren(xmlNodePtr /*aNode*/)
 {
   return true;
 }
index 1b0d6f300488c0c52dde0040b0cb3c865a559157..036c6d697718db80d74fadf1b1f0bd01f61d1116 100644 (file)
   #include "Config_ValidatorReader.h"
   #include "Config_XMLReader.h"
 
+  #ifdef _MSC_VER
+  # pragma warning(disable: 4127) // conditional expression is constant
+  # pragma warning(disable: 4456) // declaration of variable hides previous local declaration
+  # pragma warning(disable: 4459) // declaration of variable hides global declaration
+  # pragma warning(disable: 4701) // potentially uninitialized local variable
+  # pragma warning(disable: 4703) // potentially uninitialized local pointer variable
+  #endif
+
 #endif /* SRC_CONFIG_SWIG_H_ */
index d990b3f544eea33b6efb0b7da29de65ea3429286..9b1744d325f2f3c66fc1c06994a6cadd938772b9 100644 (file)
@@ -304,8 +304,7 @@ std::list<std::shared_ptr<GeomAPI_Vertex> >
     }
   }
 
-  return GeomAlgoAPI_ShapeTools::intersect(anEdge, aFace,
-    aPlaneSelection->context()->groupName() == ModelAPI_ResultConstruction::group());
+  return GeomAlgoAPI_ShapeTools::intersect(anEdge, aFace);
 }
 
 //==================================================================================================
index e395be12ea0f189f6d53dd9b2659ea6a4996bf21..92fdf329c766340dd30c8f74d2b99dc00ecb077d 100644 (file)
   #include "Events_Loop.h"
   #include "Events_Message.h"
   #include "Events_MessageGroup.h"
+
+  #ifdef _MSC_VER
+  # pragma warning(disable: 4456) // declaration of variable hides previous local declaration
+  # pragma warning(disable: 4459) // declaration of variable hides global declaration
+  #endif
 %}
 
 
index 83020941781f8df3c65df0de71b75c1c4ea863a5..000e178abdc874dff99814310bae3a905abbb4c6 100644 (file)
@@ -181,7 +181,7 @@ ExportPtr exportToXAO(const std::shared_ptr<ModelAPI_Document> & thePart,
 
 ExportPtr exportToXAO(const std::shared_ptr<ModelAPI_Document> & thePart,
   const std::string & theFilePath, const ModelHighAPI_Selection& theSelectedShape,
-  const std::string & theAuthor, const std::string & theGeometryName)
+  const std::string & /*theAuthor*/, const std::string & /*theGeometryName*/)
 {
   apply(); // finish previous operation to make sure all previous operations are done
   std::shared_ptr<ModelAPI_Feature> aFeature =
index 4253f2bb559d3467ad49ff6c8c956251ca99afca..29fcfe43b07dabe5a0585f8e0a5f93e055a4f3f2 100644 (file)
@@ -234,7 +234,6 @@ static bool isInResults(AttributeSelectionListPtr theSelection,
 {
   // collect all results into a cashed set
   if (theCashedResults.empty()) {
-    std::list<ResultPtr> aResults;
     std::list<ResultPtr>::const_iterator aRes = theResults.cbegin();
     for(; aRes != theResults.cend(); aRes++) {
       if (theCashedResults.count(*aRes))
@@ -511,8 +510,8 @@ void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName)
               int anElementID = 0;
               if (!isWholePart) {
                 // element index actually is the ID of the selection
-                AttributeSelectionPtr aSelection = aSelectionList->value(aRow - 1);
-                int aReferenceID = GeomAlgoAPI_CompoundBuilder::id(aShape, aSelection->value());
+                AttributeSelectionPtr aSel = aSelectionList->value(aRow - 1);
+                int aReferenceID = GeomAlgoAPI_CompoundBuilder::id(aShape, aSel->value());
                 if (aReferenceID == 0) // selected value does not found in the exported shape
                   continue;
 
index d589a0011799df781d37787e27bbc9fe9416d6fd..7ef6c5fe6c329efd30740c0d22eeeab63db4ede8 100644 (file)
@@ -196,9 +196,9 @@ void collectFeatures(DocumentPtr theDocument,
   std::set<FeaturePtr> aFeaturesToExport;
   for (int anIndex = 0, aSize = theSelected->size(); anIndex < aSize; ++anIndex) {
     AttributeSelectionPtr aCurrent = theSelected->value(anIndex);
-    FeaturePtr aCurrentFeature = ModelAPI_Feature::feature(aCurrent->context());
-    if (aCurrentFeature)
-      aFeaturesToExport.insert(aCurrentFeature);
+    FeaturePtr aCurFeature = ModelAPI_Feature::feature(aCurrent->context());
+    if (aCurFeature)
+      aFeaturesToExport.insert(aCurFeature);
   }
   // recursively collect all features used for the selected results
   allReferencedFeatures(aFeaturesToExport, aFeaturesToExport);
index 0b1c6cb95a31e86f889fb5e4dd5041274ab4d96b..20dd90a3704a13648ecd5009336597fdcd2c31b3 100644 (file)
@@ -363,13 +363,13 @@ void ExchangePlugin_ImportFeature::removeFeature(
 }
 // LCOV_EXCL_STOP
 
-int ExchangePlugin_ImportFeature::numberOfSubs(bool forTree) const
+int ExchangePlugin_ImportFeature::numberOfSubs(bool /*forTree*/) const
 {
   return data()->reflist(FEATURES_ID())->size(true);
 }
 
 std::shared_ptr<ModelAPI_Feature> ExchangePlugin_ImportFeature::subFeature(
-    const int theIndex, bool forTree)
+    const int theIndex, bool /*forTree*/)
 {
   ObjectPtr anObj = data()->reflist(FEATURES_ID())->object(theIndex, false);
   FeaturePtr aRes = std::dynamic_pointer_cast<ModelAPI_Feature>(anObj);
index e5df6d5351d2f4a2eedae2fd9cfe45926282e8dc..eb4ea4a151a562287e003f5cde43c45faf2f8c55 100644 (file)
@@ -46,7 +46,8 @@ bool ExchangePlugin_FormatValidator::parseFormats(const std::list<std::string>&
       continue;
     }
     std::string aFormats = anArg.substr(0, aSepPos);
-    std::transform(aFormats.begin(), aFormats.end(), aFormats.begin(), toupper);
+    std::transform(aFormats.begin(), aFormats.end(), aFormats.begin(),
+                   [](char c) { return static_cast<char>(::toupper(c)); });
     std::list<std::string> aFormatList = ExchangePlugin_Tools::split(aFormats, '|');
     outFormats.insert(outFormats.end(), aFormatList.begin(), aFormatList.end());
   }
@@ -85,7 +86,8 @@ bool ExchangePlugin_FormatValidator::isValid(const AttributePtr& theAttribute,
   ExchangePlugin_FormatValidator::parseFormats(theArguments, aFormats);
   std::list<std::string>::const_iterator itFormats = aFormats.begin();
   size_t aFileNameLen = aFileName.length();
-  std::transform(aFileName.begin(), aFileName.end(), aFileName.begin(), toupper);
+  std::transform(aFileName.begin(), aFileName.end(), aFileName.begin(),
+                 [](char c) { return static_cast<char>(::toupper(c)); });
   // Is file name ends with the format
   for (; itFormats != aFormats.end(); ++itFormats) {
     std::string aFormat = "." + *itFormats;
index b032ae004b71fbd1d1e350bebb90b5b435fcc179..0c7f3bab1f292731aa907c874482204f10440651 100644 (file)
@@ -97,8 +97,8 @@ void FeaturesPlugin_BooleanSmash::execute()
       // add unused shapes of compounds/compsolids to the history,
       // to avoid treating them as unused later when constructing a compound containing
       // the result of Smash and all unused sub-shapes of multi-level compounds
-      for (ListOfShape::iterator anIt = aNotUsed.begin(); anIt != aNotUsed.end(); ++anIt)
-        anObjectsHistory.addObject(*anIt);
+      for (ListOfShape::iterator aNUIt = aNotUsed.begin(); aNUIt != aNotUsed.end(); ++aNUIt)
+        anObjectsHistory.addObject(*aNUIt);
     }
   }
 
index 2a3eed919a472b5cf595d19fed4f5940b288b053..4ab108ec722757dda7ec8ff2d72ff6935fdc73de 100644 (file)
@@ -288,13 +288,13 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools,
              aCompSolidIt.next())
         {
           GeomShapePtr aSolidInCompSolid = aCompSolidIt.current();
-          ListOfShape::iterator anIt = aUsedShapes.begin();
-          for(; anIt != aUsedShapes.end(); anIt++) {
-            if(aSolidInCompSolid->isEqual(*anIt)) {
+          ListOfShape::iterator aUseIt = aUsedShapes.begin();
+          for(; aUseIt != aUsedShapes.end(); anIt++) {
+            if(aSolidInCompSolid->isEqual(*aUseIt)) {
               break;
             }
           }
-          if(anIt == aUsedShapes.end()) {
+          if(aUseIt == aUsedShapes.end()) {
             aShapesToAdd.push_back(aSolidInCompSolid);
           }
         }
index f49aa97a85a457fbee12d6b3ed85dfb7ff672f6a..56f5861753a606f4fa7da04369ad4c0f5b452e0c 100644 (file)
@@ -67,7 +67,7 @@ std::shared_ptr<ModelAPI_Feature> FeaturesPlugin_CompositeSketch::addFeature(std
 }
 
 //=================================================================================================
-int FeaturesPlugin_CompositeSketch::numberOfSubs(bool forTree) const
+int FeaturesPlugin_CompositeSketch::numberOfSubs(bool /*forTree*/) const
 {
   ObjectPtr aObj = data()->reference(SKETCH_ID())->value();
   return aObj.get() ? 1 : 0;
@@ -75,7 +75,7 @@ int FeaturesPlugin_CompositeSketch::numberOfSubs(bool forTree) const
 
 //=================================================================================================
 std::shared_ptr<ModelAPI_Feature> FeaturesPlugin_CompositeSketch::subFeature(const int theIndex,
-                                                                             bool forTree)
+                                                                             bool /*forTree*/)
 {
   FeaturePtr aSubFeature;
   if(theIndex == 0) {
index 315f3e7070ef8396477fc2c0da319700fd373080..2a6119eb447847b1c65e68d858442ec9e9327e2b 100644 (file)
@@ -484,7 +484,6 @@ AISObjectPtr FeaturesPlugin_Measurement::radiusDimension(AISObjectPtr thePreviou
   }
   if (aShape.get()) {
     TopoDS_Shape aShp = aShape->impl<TopoDS_Shape>();
-    Handle(AIS_RadiusDimension) aDim;
     if (thePrevious.get()) {
       aAISObj = thePrevious;
       Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
index be47490ad99760318c70c71c917308dae3719e51..a582dcc920ef5dfc93dbe5eede14f20d57cd9735 100644 (file)
@@ -302,6 +302,7 @@ void FeaturesPlugin_Pipe::storeResult(const std::shared_ptr<GeomAPI_Shape> theBa
     }
     case GeomAPI_Shape::COMPOUND: {
       aShapeTypeToExplode = GeomAPI_Shape::COMPOUND;
+      break;
     }
     default:
       return; // unsupported type of shape
index 26573fe20afcba6276e82f0ba3995201cf1741a1..41a18c8c8abada8d84becf43166c19f258d1a266 100644 (file)
@@ -28,7 +28,7 @@
 #include <ModelAPI_Tools.h>
 
 bool FeaturesPlugin_ValidatorTransform::isValid(const AttributePtr& theAttribute,
-                                                const std::list<std::string>& theArguments,
+                                                const std::list<std::string>& /*theArguments*/,
                                                 Events_InfoMessage& theError) const
 {
   bool aValid = true;
index 8b504ec4d59c59583db79faf64763db02d07cb40..e92148495868ded97bada247c73ca484abfb356b 100644 (file)
 #define _USE_MATH_DEFINES
 #include <math.h>
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4100)
+#endif
+
 //==================================================================================================
 bool FeaturesPlugin_ValidatorPipePath::isValid(const AttributePtr& theAttribute,
                                                const std::list<std::string>& theArguments,
@@ -433,7 +437,7 @@ bool FeaturesPlugin_ValidatorBaseForGeneration::isValidAttribute(const Attribute
         return false;
       }
 
-      GeomShapePtr aContextShape = aContext->shape();
+      aContextShape = aContext->shape();
       if(aShape->isEqual(aContextShape)) {
         // Whole construction selected. Check that it have faces.
         if(aConstruction->facesNum() > 0) {
@@ -1559,16 +1563,16 @@ bool FeaturesPlugin_IntersectionSelection::isValid(const AttributePtr& theAttrib
       return false;
     }
     ResultPtr aContext = anAttrSelection->context();
-    if(!aContext.get()) {
-      FeaturePtr aContFeat = anAttrSelection->contextFeature();
-      if (!aContFeat.get() || !aContFeat->results().size() ||
-          aContFeat->firstResult()->groupName() != ModelAPI_ResultBody::group()) {
+    if (aContext.get()) {
+      aFeature = ModelAPI_Feature::feature(aContext);
+    } else {
+      aFeature = anAttrSelection->contextFeature();
+      if (!aFeature.get() || !aFeature->results().size() ||
+          aFeature->firstResult()->groupName() != ModelAPI_ResultBody::group()) {
         theError = "Error: Empty selection context.";
         return false;
       }
     }
-    FeaturePtr aFeature = anAttrSelection->contextFeature().get() ?
-      anAttrSelection->contextFeature() : ModelAPI_Feature::feature(aContext);
     if (!aFeature.get()) {
       theError = "Error: empty feature.";
       return false;
index 466afecc9c78d5adcb1a135d23016272c72f06eb..7dfa2e3394ec18945277654e11746f4ce1cdaada 100644 (file)
@@ -93,8 +93,8 @@ void FeaturesPlugin_VersionedChFi::execute()
                                              aMakeShapeList, *anIt, aPrefix);
     setResult(aResultBody, aResultIndex++);
 
-    for (ListOfShape::iterator anIt = anEdges.begin(); anIt != anEdges.end(); ++anIt) {
-      GeomShapePtr aBase = *anIt;
+    for (ListOfShape::iterator aEIt = anEdges.begin(); aEIt != anEdges.end(); ++aEIt) {
+      GeomShapePtr aBase = *aEIt;
       // Store new faces generated from edges and vertices
       aResultBody->loadGeneratedShapes(aMakeShapeList, aBase, GeomAPI_Shape::EDGE, aPrefix, true);
     }
index c42855d05426dc01c9895c8351e256926e815625..f21c7b5863c27e58126d9f4075386361ff08e03f 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <ModelAPI_AttributeSelectionList.h>
 
-bool FiltersPlugin_BelongsTo::isSupported(GeomAPI_Shape::ShapeType theType) const
+bool FiltersPlugin_BelongsTo::isSupported(GeomAPI_Shape::ShapeType /*theType*/) const
 {
   return true;
 }
@@ -35,8 +35,8 @@ bool FiltersPlugin_BelongsTo::isOk(const GeomShapePtr& theShape, const ResultPtr
   if (!aList.get())
     return false;
   for (int i = 0; i < aList->size(); i++) {
-    AttributeSelectionPtr aAttr = aList->value(i);
-    GeomShapePtr aGeom = aAttr->value();
+    AttributeSelectionPtr aCurAttr = aList->value(i);
+    GeomShapePtr aGeom = aCurAttr->value();
     if (aGeom && aGeom->isSubShape(theShape))
       return true;
   }
index b30bd559193c1f4e16891241936aca403620d61a..7596b1d77780de7d8350569203c4f32164cb62bc 100644 (file)
@@ -31,7 +31,7 @@ bool FiltersPlugin_ExternalFaces::isSupported(GeomAPI_Shape::ShapeType theType)
 
 bool FiltersPlugin_ExternalFaces::isOk(const GeomShapePtr& theShape,
                                        const ResultPtr& theResult,
-                                       const ModelAPI_FiltersArgs& theArgs) const
+                                       const ModelAPI_FiltersArgs& /*theArgs*/) const
 {
   if (!theShape->isFace())
     return false;
index 2ef639695f90a1ac75e33947cb3e106fdd97573f..938d4cd7332639a08f80b84c782bc5347e7ca041 100644 (file)
@@ -28,7 +28,7 @@ bool FiltersPlugin_HorizontalFace::isSupported(GeomAPI_Shape::ShapeType theType)
 }
 
 bool FiltersPlugin_HorizontalFace::isOk(const GeomShapePtr& theShape, const ResultPtr&,
-                                        const ModelAPI_FiltersArgs& theArgs) const
+                                        const ModelAPI_FiltersArgs& /*theArgs*/) const
 {
   if (!theShape->isFace() || !theShape->isPlanar())
     return false;
index 87fa74e0ae2f5acc7feef963c6a49184de960979..ded1efd5f27141e3bdb75e0aad1fc31d8aa0065a 100644 (file)
@@ -35,10 +35,10 @@ bool FiltersPlugin_OnGeometry::isOk(const GeomShapePtr& theShape, const ResultPt
   if (!aList.get())
     return false;
   for (int i = 0; i < aList->size(); i++) {
-    AttributeSelectionPtr aAttr = aList->value(i);
-    GeomShapePtr aGeom = aAttr->value();
+    AttributeSelectionPtr aCurAttr = aList->value(i);
+    GeomShapePtr aGeom = aCurAttr->value();
     if (!aGeom)
-      aGeom = aAttr->context()->shape();
+      aGeom = aCurAttr->context()->shape();
     if (aGeom && aGeom->isSameGeometry(theShape))
       return true;
   }
index 91634e9ad51e85e82b3d66008f95be77df4d281d..095117a0e0587c84bc5f165fc1058db12644e70a 100644 (file)
@@ -98,9 +98,8 @@ bool FiltersPlugin_OnPlane::isOk(const GeomShapePtr& theShape, const ResultPtr&,
     if (aFace->isPlanar()) {
       GeomPlanePtr aPln = aFace->getPlane();
       for (int i = 0; i < aList->size(); i++) {
-        AttributeSelectionPtr aAttr = aList->value(i);
-        GeomShapePtr aGeom = aAttr->value();
-        GeomPlanePtr aPlane = getPlane(aAttr);
+        AttributeSelectionPtr aCurAttr = aList->value(i);
+        GeomPlanePtr aPlane = getPlane(aCurAttr);
         if (aPlane->isCoincident(aPln))
           return true;
       }
index 0ec771b3cb705ddb91e42b402a8893fe458d5aa4..9554d53ca4910fd374983b876e8e183b2ae7791b 100644 (file)
@@ -27,7 +27,7 @@
 #include <GeomAPI_XYZ.h>
 
 
-bool FiltersPlugin_OnPlaneSide::isSupported(GeomAPI_Shape::ShapeType theType) const
+bool FiltersPlugin_OnPlaneSide::isSupported(GeomAPI_Shape::ShapeType /*theType*/) const
 {
   return true;
 }
index 63c644ca6882b797a842f5d5f2b8ac0ea056cb25..c4d6426a922ba2a7b46e6d7a102e60e88d9583bb 100644 (file)
@@ -25,7 +25,7 @@
 #include <ModelAPI_Session.h>
 
 bool FiltersPlugin_ShapeTypeValidator::isValid(const AttributePtr& theAttribute,
-                                               const std::list<std::string>& theArguments,
+                                               const std::list<std::string>& /*theArguments*/,
                                                Events_InfoMessage& theError) const
 {
   if (!theAttribute)
index 01f9154a23e4870fd62eb039095b80a9dcd2ca9f..8e4fcde9057a310d3da8a022cb71214d62dde128 100644 (file)
@@ -33,7 +33,7 @@ bool FiltersPlugin_VerticalFace::isSupported(GeomAPI_Shape::ShapeType theType) c
 }
 
 bool FiltersPlugin_VerticalFace::isOk(const GeomShapePtr& theShape, const ResultPtr&,
-                                      const ModelAPI_FiltersArgs& theArgs) const
+                                      const ModelAPI_FiltersArgs& /*theArgs*/) const
 {
   static const double THE_TOLERANCE = 1.e-7;
 
index 330ee20cb479b7bd140bc959827ad91bdf2e019b..0cf6c079fc5c54e69d6d380a5c34635619fac06e 100644 (file)
@@ -105,12 +105,11 @@ std::shared_ptr<GeomAPI_Shape> GeomAPI_AISObject::getShape() const
   if (!anAIS.IsNull()) {
     Handle(AIS_Shape) aShapeAIS = Handle(AIS_Shape)::DownCast(anAIS);
     if (aShapeAIS) {
-      std::shared_ptr<GeomAPI_Shape> aResult(new GeomAPI_Shape);
+      aResult.reset(new GeomAPI_Shape);
       aResult->setImpl(new TopoDS_Shape(aShapeAIS->Shape()));
-      return aResult;
     }
   }
-  return std::shared_ptr<GeomAPI_Shape>();
+  return aResult;
 }
 
 void GeomAPI_AISObject::createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,
index 2fb3073a2c78a9e8523f96ce5786e6729044145a..99d21c30741cc5a9d7e0f54221b6b3c07eca86a2 100644 (file)
@@ -469,7 +469,8 @@ GeomAPI_Shape::ShapeType GeomAPI_Shape::shapeType() const
 
 GeomAPI_Shape::ShapeType GeomAPI_Shape::shapeTypeByStr(std::string theType)
 {
-  std::transform(theType.begin(), theType.end(), theType.begin(), ::toupper);
+  std::transform(theType.begin(), theType.end(), theType.begin(),
+                 [](char c) { return static_cast<char>(::toupper(c)); });
   if (theType == "COMPOUND" || theType == "COMPOUNDS")
     return COMPOUND;
   if (theType == "COMPSOLID" || theType == "COMPSOLIDS")
index 17fcd63bda38713a74eb986ffee8dd5a5a6af354..5974c2266abf949e62b40c7bfe7e31e4717253d6 100644 (file)
   #include <memory>
   #include <string>
 
+  #ifdef _MSC_VER
+  # pragma warning(disable: 4127) // conditional expression is constant
+  # pragma warning(disable: 4456) // declaration of variable hides previous local declaration
+  # pragma warning(disable: 4459) // declaration of variable hides global declaration
+  # pragma warning(disable: 4701) // potentially uninitialized local variable
+  # pragma warning(disable: 4703) // potentially uninitialized local pointer variable
+  #endif
+
   template<class T1, class T2>
   std::shared_ptr<T1> shared_ptr_cast(std::shared_ptr<T2> theObject)
   {
index cc000fc2627b01c2e502b94e8deb339d58baecd3..f20f60c26cad9e172dac1fc51f53e2156225a7c1 100644 (file)
@@ -257,7 +257,6 @@ void GeomAlgoAPI_MakeShape::initialize()
 void GeomAlgoAPI_MakeShape::prepareNamingFaces()
 {
   long long index = 1;
-  GeomAPI_ShapeExplorer anExp(shape(), GeomAPI_Shape::FACE);
   for(GeomAPI_ShapeExplorer anExp(shape(), GeomAPI_Shape::FACE); anExp.more(); anExp.next()) {
     GeomShapePtr aFace = anExp.current();
     myCreatedFaces["Face_" + std::to_string(index++)] = aFace;
index 629f12df2fc7230bc737e7911c6a73cab276ae2c..eff0d0fe0ee185a2cdcdc84add88616d042c99bc 100644 (file)
@@ -86,14 +86,14 @@ const GeomShapePtr GeomAlgoAPI_MakeShapeList::shape() const
 void GeomAlgoAPI_MakeShapeList::generated(const GeomShapePtr theOldShape,
                                           ListOfShape& theNewShapes)
 {
-  result(theOldShape,  GeomAlgoAPI_MakeShapeList::Generated, theNewShapes);
+  result(theOldShape, theNewShapes);
 }
 
 //==================================================================================================
 void GeomAlgoAPI_MakeShapeList::modified(const GeomShapePtr theOldShape,
                                          ListOfShape& theNewShapes)
 {
-  result(theOldShape, GeomAlgoAPI_MakeShapeList::Modified, theNewShapes);
+  result(theOldShape, theNewShapes);
 }
 
 //==================================================================================================
@@ -114,7 +114,6 @@ bool GeomAlgoAPI_MakeShapeList::isDeleted(const GeomShapePtr theOldShape)
 
 //==================================================================================================
 void GeomAlgoAPI_MakeShapeList::result(const GeomShapePtr theOldShape,
-                                       OperationType theOperationType,
                                        ListOfShape& theNewShapes)
 {
   if(myListOfMakeShape.empty()) {
index 24cfb2905ff41074cccb1e232cc315a5ef7db850..9800c1c3141310233c7fa1355c5ce7b9eb482488 100644 (file)
@@ -71,7 +71,6 @@ public:
 
 private:
   void result(const GeomShapePtr theShape,
-              OperationType theOperationType,
               ListOfShape& theHistory);
 
 protected:
index de232461735f2393adad21746beb5c0daf50ee55..19787b7cdc27bae55379b5194eb9ee4f46f5d22b 100644 (file)
@@ -234,7 +234,7 @@ void GeomAlgoAPI_Placement::build(const std::shared_ptr<GeomAPI_Shape>& theSourc
     // store the accumulated information about the result and this delta
     myTrsf.reset(new GeomAPI_Trsf(new gp_Trsf(aTrsf)));
     TopoDS_Shape aResult = aSourceShape.Moved(aDelta);
-    std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+    aShape.reset(new GeomAPI_Shape());
     aShape->setImpl(new TopoDS_Shape(aResult));
     this->setShape(aShape);
     this->setDone(true); // it is allways true for simple transformation generation
@@ -251,7 +251,7 @@ void GeomAlgoAPI_Placement::build(const std::shared_ptr<GeomAPI_Shape>& theSourc
     }
     TopoDS_Shape aResult = aBuilder->Shape();
 
-    std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+    aShape.reset(new GeomAPI_Shape());
     aShape->setImpl(new TopoDS_Shape(aResult));
     this->setShape(aShape);
     this->setDone(true);
index e39e2075a10f08b47b8e9253b8fd8bc11d7d74ff..052a43ed8fae6de02626e8745f652e10f7ec78a9 100644 (file)
@@ -29,7 +29,7 @@
 #include <Interface_Static.hxx>
 
 bool STEPExport(const std::string& theFileName,
-                const std::string& theFormatName,
+                const std::string& /*theFormatName*/,
                 const std::shared_ptr<GeomAPI_Shape>& theShape,
                 std::string& theError)
 {
index 639e9aace82586e0a0505c7cc6eb1c9eda530eac..d35f58bade2cd907ef1e4bdb7642665b0b996e3c 100644 (file)
@@ -297,8 +297,8 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeTools::combineShapes(
           aTempIter(aTempList); aTempIter.More(); aTempIter.Next()) {
         const TopoDS_Shape& aTempShape = aTempIter.Value();
         for(TopTools_IndexedDataMapOfShapeListOfShape::Iterator
-            anIter(aMapSA); anIter.More(); anIter.Next()) {
-          TopTools_ListOfShape& aTempListOfShape = anIter.ChangeValue();
+            anIter2(aMapSA); anIter2.More(); anIter2.Next()) {
+          TopTools_ListOfShape& aTempListOfShape = anIter2.ChangeValue();
           if(aTempListOfShape.IsEmpty()) {
             continue;
           } else if(aTempListOfShape.Size() == 1 && aTempListOfShape.First() == aTempShape) {
@@ -872,8 +872,7 @@ bool GeomAlgoAPI_ShapeTools::isParallel(const std::shared_ptr<GeomAPI_Edge> theE
 
 //==================================================================================================
 std::list<std::shared_ptr<GeomAPI_Vertex> > GeomAlgoAPI_ShapeTools::intersect(
-  const std::shared_ptr<GeomAPI_Edge> theEdge, const std::shared_ptr<GeomAPI_Face> theFace,
-  const bool thePointsOutsideFace)
+  const std::shared_ptr<GeomAPI_Edge> theEdge, const std::shared_ptr<GeomAPI_Face> theFace)
 {
   std::list<std::shared_ptr<GeomAPI_Vertex> > aResult;
   if(!theEdge.get() || !theFace.get()) {
index b24f6c177e6860f79abc45b21be4c3284eadb74d..e321dd3e365c82e2fd54f4cdb5f1324071c185a8 100644 (file)
@@ -145,12 +145,11 @@ public:
   GEOMALGOAPI_EXPORT static bool isParallel(const std::shared_ptr<GeomAPI_Edge> theEdge,
                                             const std::shared_ptr<GeomAPI_Face> theFace);
 
-  // Computes intersection point between the edge curve and a face surface (only one point, with
-  // preferences to point that belongs to edge and face boundaries.
+  /// Computes intersection point between the edge curve and a face surface (only one point, with
+  /// preferences to point that belongs to edge and face boundaries.
   /// \returns null if there is no intersection
   GEOMALGOAPI_EXPORT static std::list<std::shared_ptr<GeomAPI_Vertex> > intersect(
-    const std::shared_ptr<GeomAPI_Edge> theEdge, const std::shared_ptr<GeomAPI_Face> theFace,
-    const bool thePointsOutsideFace);
+    const std::shared_ptr<GeomAPI_Edge> theEdge, const std::shared_ptr<GeomAPI_Face> theFace);
 
   typedef std::map<std::shared_ptr<GeomAPI_Pnt>,
                    std::pair<std::list<std::shared_ptr<GeomDataAPI_Point2D> >,
index ceb786746a45f5cb4ea2578f5225b540519bf735..867bb355bc962e30ca001226ccf8625f911761a9 100644 (file)
@@ -202,7 +202,7 @@ static void sortAreas(TopTools_ListOfShape& theAreas,
 
 void GeomAlgoAPI_SketchBuilder::build(
     const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
-    const std::shared_ptr<GeomAPI_Dir>& theDirX,
+    const std::shared_ptr<GeomAPI_Dir>& /*theDirX*/,
     const std::shared_ptr<GeomAPI_Dir>& theNorm,
     const std::list<std::shared_ptr<GeomAPI_Shape> >& theEdges)
 {
index 3dea074087c2f90bdd6b94c8c231109257dc0b18..bfc4cb1493c8f067e55728f833391a5d7dffc084 100644 (file)
@@ -113,9 +113,9 @@ GeomShapePtr GeomAlgoAPI_WireBuilder::wire(const ListOfShape& theShapes)
           anEdge.Orientation(TopAbs_FORWARD);
           // if the edge was already processed, remove it to keep original order of the current wire
           if (!aProcessedEdges.add(anEdge)) {
-            for (TopTools_ListIteratorOfListOfShape anIt(aListOfEdges); anIt.More(); anIt.Next())
-              if (SetOfEdges::isEqual(anEdge, anIt.Value())) {
-                aListOfEdges.Remove(anIt);
+            for (TopTools_ListIteratorOfListOfShape aEIt(aListOfEdges); aEIt.More(); aEIt.Next())
+              if (SetOfEdges::isEqual(anEdge, aEIt.Value())) {
+                aListOfEdges.Remove(aEIt);
                 break;
               }
           }
index f35a402f0f16b8f6c8b1c974a6550deeb5a9cb32..124e4b9138f0a01e44ed6505bfba1b930fc8abc9 100644 (file)
   #include <string>
   #include <list>
 
+  #ifdef _MSC_VER
+  # pragma warning(disable: 4456) // declaration of variable hides previous local declaration
+  # pragma warning(disable: 4459) // declaration of variable hides global declaration
+  # pragma warning(disable: 4701) // potentially uninitialized local variable
+  # pragma warning(disable: 4703) // potentially uninitialized local pointer variable
+  #endif
+
 #endif /* SRC_GEOMALGOAPI_GEOMALGOAPI_SWIG_H_ */
index 1bcb58b77e42aad2bfca77112abc8952c4ce7cce..64f4a404f0475e648dbed0494f769f826267d0d0 100644 (file)
@@ -26,7 +26,7 @@
 #include "ModelAPI_CompositeFeature.h"
 
 bool GeomValidators_ConstructionComposite::isValid(const AttributePtr& theAttribute,
-                                                   const std::list<std::string>& theArguments,
+                                                   const std::list<std::string>& /*theArguments*/,
                                                    Events_InfoMessage& theError) const
 {
   bool aValid = true;
index 92efa01ef61d47b8b9e425036af23935d37e555f..36f6906e9bb57c870082954b56823b59d1c04080 100644 (file)
@@ -30,7 +30,7 @@
 
 //=================================================================================================
 bool GeomValidators_DifferentShapes::isValid(const AttributePtr& theAttribute,
-                                      const std::list<std::string>& theArguments,
+                                      const std::list<std::string>& /*theArguments*/,
                                       Events_InfoMessage& theError) const
 {
   bool isValid = false;
index 0b1db5b9ee062d41c041db835015acf1a69bf260..d0a7f7616977f3d8d526a92f9ef4ed2971faf931 100644 (file)
@@ -25,7 +25,7 @@
 #include <ModelAPI_ResultConstruction.h>
 
 bool GeomValidators_Finite::isValid(const AttributePtr& theAttribute,
-                                   const std::list<std::string>& theArguments,
+                                   const std::list<std::string>& /*theArguments*/,
                                    Events_InfoMessage& theError) const
 {
   bool aValid = true;
index 5b5fd026a674ebe4054bd91d782ad23d990eaab6..1db9dd7526f486f3d778b905a3b04044c52656e9 100644 (file)
@@ -63,7 +63,8 @@ GeomValidators_ShapeType::TypeOfShape
     MyShapeTypes["compound"]  = Compound;
   }
   std::string aType = std::string(theType.c_str());
-  std::transform(aType.begin(), aType.end(), aType.begin(), ::tolower);
+  std::transform(aType.begin(), aType.end(), aType.begin(),
+                 [](char c) { return static_cast<char>(::tolower(c)); });
   if (MyShapeTypes.find(aType) != MyShapeTypes.end())
     return MyShapeTypes[aType];
 
@@ -113,9 +114,8 @@ bool GeomValidators_ShapeType::isValid(const AttributePtr& theAttribute,
   }
   if (!aValid && theError.empty()) {
     std::string aTypes;
-    std::list<std::string>::const_iterator anIt = theArguments.begin(), aLast = theArguments.end();
     // returns true if the attribute satisfies at least one of given arguments
-    for (; anIt != aLast; anIt++) {
+    for (anIt = theArguments.begin(); anIt != aLast; anIt++) {
       if (!aTypes.empty())
         aTypes += ", ";
       aTypes += *anIt;
@@ -169,12 +169,12 @@ bool GeomValidators_ShapeType::isValidAttribute(const AttributePtr& theAttribute
         theError = "It has reference to an empty attribute";
       }
       else {
-        std::string anAttributeType = aRefAttr->attributeType();
-        aValid = anAttributeType == GeomDataAPI_Point2D::typeId();
+        std::string anAttrType = aRefAttr->attributeType();
+        aValid = anAttrType == GeomDataAPI_Point2D::typeId();
         if (!aValid) {
 // LCOV_EXCL_START
           theError = "Shape type is \"%1\", it should be \"%2\"";
-          theError.arg(anAttributeType).arg(getShapeTypeDescription(theShapeType));
+          theError.arg(anAttrType).arg(getShapeTypeDescription(theShapeType));
 // LCOV_EXCL_STOP
         }
       }
index ff484ce856b2f6290afe5114becdc1431555f4f1..294fc500ee58fc2863fa5469afd8823c6519193f 100644 (file)
@@ -137,8 +137,8 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>&
       aToShape =  anAttrSel->context()->shape();
     }
     if (aToShape->isCompound()) {
-      GeomAPI_ShapeIterator anIt(aToShape);
-      aToShape = anIt.current();
+      GeomAPI_ShapeIterator aSIt(aToShape);
+      aToShape = aSIt.current();
     }
   }
   anIt++;
@@ -156,8 +156,8 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>&
       aFromShape = anAttrSel->context()->shape();
     }
     if (aFromShape->isCompound()) {
-      GeomAPI_ShapeIterator anIt(aFromShape);
-      aFromShape = anIt.current();
+      GeomAPI_ShapeIterator aSIt(aFromShape);
+      aFromShape = aSIt.current();
     }
   }
   anIt++;
index 888f0c00a93b62cda1294380a5e6c2f719ea22ab..68c9c32030abd45a78567c6c4d57d908d5e05b78 100644 (file)
@@ -366,9 +366,9 @@ std::shared_ptr<GeomAPI_Shape> Model_AttributeSelection::internalValue(CenterTyp
             std::size_t aPartEnd = aSubShapeName.find('/');
             if (aPartEnd != std::string::npos && aPartEnd != aSubShapeName.rfind('/')) {
               std::string aNameInPart = aSubShapeName.substr(aPartEnd + 1);
-              int anIndex;
+              int anInd;
               std::string aType; // to reuse already existing selection the type is not needed
-              return aPart->shapeInPart(aNameInPart, aType, anIndex);
+              return aPart->shapeInPart(aNameInPart, aType, anInd);
             }
           }
         }
@@ -557,7 +557,7 @@ void Model_AttributeSelection::split(
     aSubSh->setImpl(new TopoDS_Shape(aSub.Value()));
     setValue(theContext, aSubSh);
     for(aSub.Next(); aSub.More(); aSub.Next()) {
-      GeomShapePtr aSubSh(new GeomAPI_Shape);
+      aSubSh.reset(new GeomAPI_Shape);
       aSubSh->setImpl(new TopoDS_Shape(aSub.Value()));
       myParent->append(theContext, aSubSh);
     }
@@ -752,7 +752,7 @@ static std::map<ModelAPI_AttributeSelection::CenterType, std::string>& centersMa
 
 std::string Model_AttributeSelection::namingName(const std::string& theDefaultName)
 {
-  std::string aName("");
+  std::string aName;
   if(!this->isInitialized())
     return !theDefaultName.empty() ? theDefaultName : aName;
 
@@ -761,7 +761,6 @@ std::string Model_AttributeSelection::namingName(const std::string& theDefaultNa
     GeomShapePtr aShape = value();
     if (!aShape.get() && context().get())
       aShape = context()->shape();
-    std::string aName;
     if (aShape.get()) {
       aName = aShape->shapeTypeStr();
       if (myParent) {
@@ -1252,8 +1251,7 @@ void Model_AttributeSelection::computeValues(
     NCollection_DataMap<TopoDS_Shape, TopTools_MapOfShape, TopTools_ShapeMapHasher> aSubs;
     TopTools_DataMapOfShapeShape::Iterator aContIter(aNewToOld);
     for(; aContIter.More(); aContIter.Next()) {
-      TopExp_Explorer aSubExp(aContIter.Key(), aValType);
-      for(; aSubExp.More(); aSubExp.Next()) {
+      for(aSubExp.Init(aContIter.Key(), aValType); aSubExp.More(); aSubExp.Next()) {
         if (!aSubs.IsBound(aSubExp.Current())) {
           aSubs.Bind(aSubExp.Current(), TopTools_MapOfShape());
         }
@@ -1703,10 +1701,8 @@ void Model_AttributeSelection::updateInHistory(bool& theRemove)
   TopTools_ListOfShape aValShapes;
   if (searchNewContext(aDoc, aNewCShape, aContext, aValShape, aContLab, aNewContexts, aValShapes))
   {
-    std::set<ResultPtr> allContexts, aSkippedContext;
-    std::list<ResultPtr>::iterator aNewContext = aNewContexts.begin();
-    for(; aNewContext != aNewContexts.end(); aNewContext++)
-      allContexts.insert(*aNewContext);
+    std::set<ResultPtr> allContexts(aNewContexts.begin(), aNewContexts.end());
+    std::set<ResultPtr> aSkippedContext;
 
     // if there exist context composite and sub-result(s), leave only sub(s)
     std::set<ResultPtr>::iterator aResIter = allContexts.begin();
@@ -1914,7 +1910,7 @@ bool Model_AttributeSelection::restoreContext(std::string theName,
     if (theName.find(aDoc->kind()) == 0) { // remove the document identifier from name if exists
       aSubShapeName = theName.substr(aDoc->kind().size() + 1);
       aName = aSubShapeName;
-      std::string::size_type n = aName.find('/');
+      n = aName.find('/');
       if (n != std::string::npos) {
         aName = aName.substr(0, n);
       }
index b7b60d9f91c03dfb139f7e2c6ffd01019e53ae3e..4b9846d696aeb472d08e18d6779b346e6cfe8490 100644 (file)
@@ -301,7 +301,7 @@ static bool isIn(GeomShapePtr theInList, GeomShapePtr theShape) {
 
 bool Model_AttributeSelectionList::isInList(const ObjectPtr& theContext,
                                             const std::shared_ptr<GeomAPI_Shape>& theSubShape,
-                                            const bool theTemporarily)
+                                            const bool /*theTemporarily*/)
 {
   if (myIsCashed) { // the cashing is active
     if (theContext.get()) {
index c0e79e4d0791ab5c7525ba2f8d57146b78ab63c7..5bd66451571119d87a2f32e2e44eb7a953d6e560 100644 (file)
@@ -110,7 +110,8 @@ void Model_AttributeTables::setSize(const int theRows, const int theColumns, con
       for(int aTable = 0; aTable < theTables; aTable++) {
         for(int aColumn = 0; aColumn < theColumns; aColumn++) {
           for(int aRow = 0; aRow < theRows; aRow++) {
-            int anOldIndex, anIndex = aTable * theRows * theColumns + aRow * theColumns + aColumn;
+            int anOldIndex = 0;
+            int anIndex = aTable * theRows * theColumns + aRow * theColumns + aColumn;
             bool aRestore = aTable < myTables && aColumn < myCols && aRow < myRows;
             if (aRestore)
               anOldIndex = aTable * myRows * myCols + aRow * myCols + aColumn;
index 05bc23f74f81f6c2f8ac5f7459afdf7c8a8f9396..d29834c93991906f7be59c5141d908c846f28079 100644 (file)
@@ -32,7 +32,7 @@
 #include <GeomDataAPI_Point2D.h>
 
 bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
-                                       const std::list<std::string>& theArguments,
+                                       const std::list<std::string>& /*theArguments*/,
                                        Events_InfoMessage& theError) const
 {
   if (theAttribute->attributeType() == ModelAPI_AttributeInteger::typeId()) {
index b78b1c70746fba86e8a6c329ef350c9dfa17cc21..decf415ac0e2236f12dbf92d1adc0c9185a2811b 100644 (file)
@@ -268,12 +268,12 @@ AttributePtr Model_Data::addFloatingAttribute(
     for(; anIter.More(); anIter.Next()) {
       TCollection_AsciiString aThisName(Handle(TDataStd_Name)::DownCast(anIter.Value())->Get());
       if (theID == aThisName.ToCString()) {
-        TDF_Label aLab = anIter.Value()->Label();
+        TDF_Label aChildLab = anIter.Value()->Label();
         Handle(TDataStd_Name) aGName;
-        if (aLab.FindAttribute(kGroupAttributeGroupID, aGName)) {
+        if (aChildLab.FindAttribute(kGroupAttributeGroupID, aGName)) {
           TCollection_AsciiString aGroupName(aGName->Get());
           if (theGroup == aGroupName.ToCString()) {
-            return addAttribute(theGroup + "__" + theID, theAttrType, aLab.Tag());
+            return addAttribute(theGroup + "__" + theID, theAttrType, aChildLab.Tag());
           }
         }
       }
@@ -739,9 +739,9 @@ void Model_Data::referencesToObjects(
       if (aRef->isObject()) {
         aReferenced.push_back(aRef->object());
       } else {
-        AttributePtr anAttr = aRef->attr();
-        if (anAttr.get())
-          aReferenced.push_back(anAttr->owner());
+        AttributePtr aReferredAttr = aRef->attr();
+        if (aReferredAttr.get())
+          aReferenced.push_back(aReferredAttr->owner());
       }
     } else if (aType == ModelAPI_AttributeRefList::typeId()) { // list of references
       aReferenced = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(anAttr)->list();
index 8469e5e75795520e0bf78a553db2974d72ddf739..5a9c7b4c454f92e438817408840e306e2a9c7fa5 100644 (file)
@@ -528,8 +528,8 @@ bool Model_Document::save(
         if (!aDocName.empty()) {
           // just copy file
           TCollection_AsciiString aSubPath(DocFileName(anApp->loadPath().c_str(), aDocName));
-          OSD_Path aPath(aSubPath);
-          OSD_File aFile(aPath);
+          OSD_Path aCopyPath(aSubPath);
+          OSD_File aFile(aCopyPath);
           if (aFile.Exists()) {
             TCollection_AsciiString aDestinationDir(DocFileName(theDirName, aDocName));
             OSD_Path aDestination(aDestinationDir);
@@ -764,7 +764,7 @@ static bool isEmptyTransaction(const Handle(TDocStd_Document)& theDoc) {
   aDelta = theDoc->GetUndos().Last();
   TDF_LabelList aDeltaList;
   aDelta->Labels(aDeltaList); // it clears list, so, use new one and then append to the result
-  for(TDF_ListIteratorOfLabelList aListIter(aDeltaList); aListIter.More(); aListIter.Next()) {
+  if (!aDeltaList.IsEmpty()) {
     return false;
   }
   // add also label of the modified attributes
index 12bbab8709f936ea0fcbd5caa40b4c92a2e0d7fe..794fc048f48dfcce5e9cec02cfd904ab3d414dfe 100644 (file)
@@ -32,7 +32,7 @@
 #include <memory>
 
 bool Model_FeatureValidator::isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
-                                     const std::list<std::string>& theArguments,
+                                     const std::list<std::string>& /*theArguments*/,
                                      Events_InfoMessage& theError) const
 {
   static Model_ValidatorsFactory* aValidators =
index d83240df3c9fba2e862dc9fe9a71e681a224ffae..69955315d99dfaa6886197997d7697067b2064a0 100644 (file)
@@ -893,10 +893,8 @@ void Model_Objects::synchronizeFeatures(
               ModelAPI_Tools::allResults(aFeature, aResults);
               std::list<ResultPtr>::iterator aResIter = aResults.begin();
               for(; aResIter != aResults.end(); aResIter++) {
-                std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs =
-                  (*aResIter)->data()->attributes("");
-                std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
-                for(; anAttr != anAttrs.end(); anAttr++)
+                anAttrs = (*aResIter)->data()->attributes("");
+                for(anAttr = anAttrs.begin(); anAttr != anAttrs.end(); anAttr++)
                   (*anAttr)->reinit();
               }
             }
@@ -1189,7 +1187,7 @@ TDF_Label Model_Objects::resultLabel(
 
 bool Model_Objects::hasCustomName(DataPtr theFeatureData,
                                   ResultPtr theResult,
-                                  int theResultIndex,
+                                  int /*theResultIndex*/,
                                   std::string& theParentName) const
 {
   ResultBodyPtr aBodyRes = std::dynamic_pointer_cast<ModelAPI_ResultBody>(theFeatureData->owner());
index 1edff2c2eefadba0387d1f03b0919cd2ffd43b08..7d6918c6af9a06246a04e25d8bb4241cce6481e3 100644 (file)
@@ -128,12 +128,12 @@ void Model_ResultBody::loadFirstLevel(GeomShapePtr theShape, const std::string&
   }
 }
 
-int Model_ResultBody::numberOfSubs(bool forTree) const
+int Model_ResultBody::numberOfSubs(bool /*forTree*/) const
 {
   return int(mySubs.size());
 }
 
-ResultBodyPtr Model_ResultBody::subResult(const int theIndex, bool forTree) const
+ResultBodyPtr Model_ResultBody::subResult(const int theIndex, bool /*forTree*/) const
 {
   if (theIndex >= int(mySubs.size()))
     return ResultBodyPtr();
index ee7f404a77be627c11f841cfe2ca9d4a59d3b268..19776ba2ab640fd37c0a4f376eb5a49664875ebc 100644 (file)
@@ -222,7 +222,7 @@ void Model_ResultConstruction::setInfinite(const bool theInfinite)
   }
 }
 
-int Model_ResultConstruction::facesNum(const bool theUpdateNaming)
+int Model_ResultConstruction::facesNum(const bool /*theUpdateNaming*/)
 {
   int aResult = 0;
   std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
@@ -294,8 +294,8 @@ void Model_ResultConstruction::storeShape(std::shared_ptr<GeomAPI_Shape> theShap
       TopExp_Explorer anExp(aShape, TopAbs_VERTEX);
       for(int anIndex = 1; anExp.More(); anExp.Next(), anIndex++) {
         TDF_Label aSubLab = aShapeLab.FindChild(anIndex);
-        TNaming_Builder aBuilder(aSubLab);
-        aBuilder.Generated(anExp.Current());
+        TNaming_Builder aSubBuilder(aSubLab);
+        aSubBuilder.Generated(anExp.Current());
         std::string aVertexName = aMyName + "_" + (anIndex == 1 ? "StartVertex" : "EndVertex");
         TDataStd_Name::Set(aSubLab, aVertexName.c_str());
         aMyDoc->addNamingName(aSubLab, aVertexName);
index 5a1403ef93168d46d8823ad0b1b1a28ce1f66be1..de686eebce3042c127d3d637b6c0ea52371abc1c 100644 (file)
@@ -347,9 +347,9 @@ std::list<std::shared_ptr<ModelAPI_Document> > Model_Session::allOpenedDocuments
   std::list<std::shared_ptr<ModelAPI_Document> > aResult;
   aResult.push_back(moduleDocument());
   // add subs recursively
-  std::list<std::shared_ptr<ModelAPI_Document> >::iterator aDoc = aResult.begin();
-  for(; aDoc != aResult.end(); aDoc++) {
-    DocumentPtr anAPIDoc = *aDoc;
+  std::list<std::shared_ptr<ModelAPI_Document> >::iterator aDocIt = aResult.begin();
+  for(; aDocIt != aResult.end(); aDocIt++) {
+    DocumentPtr anAPIDoc = *aDocIt;
     std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(anAPIDoc);
     if (aDoc) {
       const std::set<int> aSubs = aDoc->subDocuments();
@@ -647,7 +647,7 @@ void Model_Session::blockAutoUpdate(const bool theBlock)
       aLoop->send(aMsg);
     } else {
       // if there is no operation, start it to avoid modifications outside of transaction
-      bool isOperation = this->isOperation();
+      isOperation = this->isOperation();
       if (!isOperation)
         startOperation("Auto update enabling");
       static const Events_ID kAutoOn = aLoop->eventByName(EVENT_AUTOMATIC_RECOMPUTATION_ENABLE);
index 9e8de8d22f270a7c2c7fb2c3bf6102a4592df638..5d0eca89ff710e9762bfb2e19c5731214ca8f02d 100644 (file)
@@ -202,11 +202,11 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
   ModelAPI_Tools::allResults(theFeature, allResults);
   std::list<ResultPtr>::iterator aRes = allResults.begin();
   for(; aRes != allResults.end(); aRes++) {
-    const std::set<std::shared_ptr<ModelAPI_Attribute> >& aRefs = (*aRes)->data()->refsToMe();
-    std::set<std::shared_ptr<ModelAPI_Attribute> >::const_iterator aRefIter = aRefs.cbegin();
-    for(; aRefIter != aRefs.cend(); aRefIter++) {
-      if ((*aRefIter)->isArgument()) {
-        FeaturePtr aReferenced = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRefIter)->owner());
+    const std::set<std::shared_ptr<ModelAPI_Attribute> >& aResRefs = (*aRes)->data()->refsToMe();
+    std::set<std::shared_ptr<ModelAPI_Attribute> >::const_iterator aRIter = aResRefs.cbegin();
+    for(; aRIter != aResRefs.cend(); aRIter++) {
+      if ((*aRIter)->isArgument()) {
+        FeaturePtr aReferenced = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRIter)->owner());
         if (aReferenced.get()) {
           addModified(aReferenced, theFeature);
         }
@@ -360,7 +360,7 @@ void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessag
         for(; aRefIter != aRefs.cend(); aRefIter++) {
           if (!(*aRefIter)->owner()->data()->isValid())
             continue;
-          FeaturePtr anUpdated = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRefIter)->owner());
+          anUpdated = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRefIter)->owner());
           if (anUpdated.get()) {
             if (addModified(anUpdated, aReason))
               aSomeModified = true;
index 72ad94ef5fde1e3213597252dbe3496866248400..00a881fdb1054cef2cfe03ea990a287c63afe9a5 100644 (file)
@@ -247,7 +247,7 @@ bool ModelAPI_Feature::isStable()
   return myIsStable;
 }
 
-bool ModelAPI_Feature::customAction(const std::string& theActionId)
+bool ModelAPI_Feature::customAction(const std::string& /*theActionId*/)
 {
   return false;
 }
index bf478d4e77bcfb5e1c55e4417b7d6efca6fd27a2..927f8de32bf56c52889e93cc2c6f26dd134ea4ba 100644 (file)
@@ -73,7 +73,7 @@ class ModelAPI_Feature : public ModelAPI_Object
   /// Computes the attribute value on the base of other attributes if the value can be computed
   /// \param theAttributeId an attribute index to be computed
   /// \return a boolean value about it is computed
-  virtual bool compute(const std::string& theAttributeId) { return false; };
+  virtual bool compute(const std::string& /*theAttributeId*/) { return false; };
 
   /// Registers error during the execution, causes the ExecutionFailed state
   MODELAPI_EXPORT virtual void setError(const std::string& theError,
index 5e3f775240ec2833cd2f8f63ea00c543cf3dc36f..ab082f21e6231f1f6d7d92f5675256c16512a7e6 100644 (file)
@@ -59,7 +59,7 @@ public:
 
   /// Initializes arguments of a filter. If a filter has no arguments, this method may be
   /// not redefined.
-  virtual void initAttributes(ModelAPI_FiltersArgs& theArguments) {}
+  virtual void initAttributes(ModelAPI_FiltersArgs& /*theArguments*/) {}
 
   /// Returns XML string which represents GUI of the filter
   /// by reading corresponding XML file.
index 6390de878d75570f27c914d9d519acde03cfe9a1..013658ae4aa420897c0520faeb8135fb7cf45c47 100644 (file)
@@ -57,7 +57,7 @@ std::shared_ptr<ModelAPI_Document> ModelAPI_Object::document() const
   return myDoc;
 }
 
-void ModelAPI_Object::attributeChanged(const std::string& theID)
+void ModelAPI_Object::attributeChanged(const std::string& /*theID*/)
 {
 }
 
index e5a5636912509a313cbff26aa951b30352971039..3db972621ea0b213e309ade25dcb009a95ca177a 100644 (file)
@@ -77,8 +77,9 @@ class ModelAPI_Object: public ModelAPI_Entity
   virtual bool isDisabled() = 0;
 
   /// Returns the parameters of color definition in the resources config manager
-  virtual void colorConfigInfo(std::string& theSection, std::string& theName,
-                               std::string& theDefault) {}
+  virtual void colorConfigInfo(std::string& /*theSection*/,
+                               std::string& /*theName*/,
+                               std::string& /*theDefault*/) {}
 
   /// Called on change of any argument-attribute of this object
   /// \param theID identifier of changed attribute
index 5220e0aa32e3a45ac3a37f364daefef06de81eb1..4f5a75a5308afefe2531689718829358173ed545 100644 (file)
@@ -80,7 +80,7 @@ bool ModelAPI_Result::isConcealed()
   return myIsConcealed;
 }
 
-void ModelAPI_Result::setIsConcealed(const bool theValue, const bool theForced)
+void ModelAPI_Result::setIsConcealed(const bool theValue, const bool /*theForced*/)
 {
   if (myIsConcealed != theValue) {
     myIsConcealed = theValue;
index 59cdff45e6cf4842813dc17af0566132952815c4..cdbe7cd7ea50e3aa935f75c00a7b7dfa19dcaaa5 100644 (file)
@@ -55,7 +55,7 @@ public:
   /// \brief Stores the result of operation made on groups.
   ///        Cleans the storage if empty shape is given.
   /// param[in] theShape shape to store.
-  MODELAPI_EXPORT virtual void store(const GeomShapePtr& theShape)
+  MODELAPI_EXPORT virtual void store(const GeomShapePtr& /*theShape*/)
   {}
 };
 
index 8a0cb64f81380276c94c9b68f96b879beb824abe..9ea14ed93e9b9869892087bb1b27f09efc34b3c8 100644 (file)
@@ -359,7 +359,7 @@ bool allDocumentsActivated(std::string& theNotActivatedNames)
 }
 
 bool removeFeaturesAndReferences(const std::set<FeaturePtr>& theFeatures,
-                                 const bool theFlushRedisplay,
+                                 const bool /*theFlushRedisplay*/,
                                  const bool theUseComposite,
                                  const bool theUseRecursion)
 {
@@ -469,10 +469,10 @@ void findReferences(const std::set<FeaturePtr>& theFeatures,
       }
       else { // filter references to skip composition features of the current feature
         std::set<FeaturePtr> aFilteredFeatures;
-        std::set<FeaturePtr>::const_iterator anIt = aSelRefFeatures.begin(),
-                                             aLast = aSelRefFeatures.end();
-        for (; anIt != aLast; anIt++) {
-          FeaturePtr aCFeature = *anIt;
+        std::set<FeaturePtr>::const_iterator aRefIt = aSelRefFeatures.begin(),
+                                             aRefLast = aSelRefFeatures.end();
+        for (; aRefIt != aRefLast; aRefIt++) {
+          FeaturePtr aCFeature = *aRefIt;
           CompositeFeaturePtr aComposite =
             std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aCFeature);
           if (aComposite.get() && aComposite->isSub(aFeature))
@@ -543,7 +543,7 @@ void findAllReferences(const std::set<FeaturePtr>& theFeatures,
     aResultRefList.insert(aMainRefList.begin(), aMainRefList.end());
     for (; anIt != aLast; anIt++) {
       FeaturePtr aFeature = *anIt;
-      int aRecLevel = 0;
+      aRecLevel = 0;
 #ifdef DEBUG_REMOVE_FEATURES_RECURSE
       std::cout << " Ref: " << getFeatureInfo(aFeature) << std::endl;
 #endif
@@ -1044,10 +1044,10 @@ std::list<FeaturePtr> referencedFeatures(
       for(; aResIter != aResSet.end(); aResIter++) {
         std::list<ResultPtr>::const_iterator aGroupRes = (*aResIter)->results().cbegin();
         for(; aGroupRes != (*aResIter)->results().cend(); aGroupRes++) {
-          const std::set<AttributePtr>& aRefs = (*aGroupRes)->data()->refsToMe();
-          std::set<AttributePtr>::const_iterator aRef = aRefs.cbegin();
-          for(; aRef != aRefs.cend(); aRef++) {
-            FeaturePtr aFeat = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRef)->owner());
+          const std::set<AttributePtr>& aGroupRefs = (*aGroupRes)->data()->refsToMe();
+          std::set<AttributePtr>::const_iterator aRefIt = aGroupRefs.cbegin();
+          for(; aRefIt != aGroupRefs.cend(); aRefIt++) {
+            FeaturePtr aFeat = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRefIt)->owner());
             if (aFeat.get() && !aGroupOperations.count(aFeat) && !aFeat->results().empty() &&
                 aFeat->firstResult()->groupName() == ModelAPI_ResultGroup::group()) {
               // iterate results of this group operation because it may be without theTarget shape
index b9ec37cad6f8d6a773dec78f334136719df7dd19..6c7101b3985bd6ff39e729f8dc30cea5b99329ea 100644 (file)
 
 
 %typemap(in) const std::list<int> & (std::list<int> temp) {
-  int newmem = 0;
   if (PySequence_Check($input)) {
     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
       PyObject * item = PySequence_GetItem($input, i);
 }
 
 %typecheck(SWIG_TYPECHECK_POINTER) std::list<int>, const std::list<int>& {
-  int newmem = 0;
   if (PySequence_Check($input)) {
     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
       PyObject * item = PySequence_GetItem($input, i);
 
 
 %typemap(in) const std::list<double> & (std::list<double> temp) {
-  int newmem = 0;
   if (PyTuple_Check($input)) {
     for (Py_ssize_t i = 0; i < PyTuple_Size($input); ++i) {
       PyObject * item = PySequence_GetItem($input, i);
 }
 
 %typecheck(SWIG_TYPECHECK_POINTER) std::list<double>, const std::list<double>& {
-  int newmem = 0;
   if (PyTuple_Check($input)) {
     for (Py_ssize_t i = 0; i < PyTuple_Size($input); ++i) {
       PyObject * item = PySequence_GetItem($input, i);
index c25f2cbc64d0479f5b0a6d363197af859e69c4ff..15d10c6aa7c01e9678042c848c0c4a20021663bc 100644 (file)
@@ -159,7 +159,7 @@ public:
   /// Dump std::endl
   friend
   DumpStorageBuffer& operator<<(DumpStorageBuffer& theBuffer,
-                                std::basic_ostream<char>& (*theEndl)(std::basic_ostream<char>&))
+                                std::basic_ostream<char>& (*)(std::basic_ostream<char>&))
   {
     theBuffer.write("\n");
     return theBuffer;
@@ -633,10 +633,10 @@ const std::string& ModelHighAPI_Dumper::name(const EntityPtr& theEntity,
       int aFullIndex = 0;
       NbFeaturesMap::const_iterator aFIt = myFeatureCount.begin();
       for (; aFIt != myFeatureCount.end(); ++aFIt) {
-        std::map<std::string, std::pair<int, int> >::const_iterator aFound =
+        std::map<std::string, std::pair<int, int> >::const_iterator aFoundKind =
           aFIt->second.find(aKind);
-        if (aFound != aFIt->second.end())
-          aFullIndex += aFound->second.first;
+        if (aFoundKind != aFIt->second.end())
+          aFullIndex += aFoundKind->second.first;
       }
       aDefaultName << aKind << "_" << aFullIndex;
     }
index 984ca70e28dd147c430112381da8361df71dbb1b..46eee3ff829c1ce98c4038114b035b89c3480102 100644 (file)
@@ -352,8 +352,8 @@ public:
   MODELHIGHAPI_EXPORT virtual void exportVariables() const;
 
   /// Export one variable name to another module (implemented in python)
-  MODELHIGHAPI_EXPORT virtual void exportVariable(
-    const std::string& theEntry, const std::string& theVarName) const {}
+  MODELHIGHAPI_EXPORT virtual void exportVariable(const std::string& /*theEntry*/,
+                                                  const std::string& /*theVarName*/) const {}
 
 protected:
   /// Dump "setName" command if last entity had user-defined name
index 2cc7a6920a1af04a77dbbf68fefb4d92e2a8c5de..47cea396e8a1d76cf415163b3d00852b73e31da7 100644 (file)
@@ -96,7 +96,7 @@ public:
 
   /// Dump wrapped feature
   MODELHIGHAPI_EXPORT
-  virtual void dump(ModelHighAPI_Dumper& theDumper) const {}
+  virtual void dump(ModelHighAPI_Dumper& /*theDumper*/) const {}
 
 protected:
   std::shared_ptr<ModelAPI_Feature> myFeature; ///< feature of this interface
index dfd3f344750aa6e3625a8b13c19912a6a1d10d84..433f619b0e07806778ee883bab747ff6e9c1d6c3 100644 (file)
@@ -98,9 +98,9 @@ std::shared_ptr<ModelAPI_Result> standardPlane(const std::string & theName){
 //--------------------------------------------------------------------------------------
 void begin()
 {
-  static size_t aTransactionID = 0;
-  static size_t aNbTransactions = -1;
-  size_t aNbUndo = ModelAPI_Session::get()->undoList().size();
+  static int aTransactionID = 0;
+  static int aNbTransactions = -1;
+  int aNbUndo = (int)ModelAPI_Session::get()->undoList().size();
   if (aNbUndo != aNbTransactions) {
     // the last transaction was not empty, thus increase the ID
     aNbTransactions = aNbUndo;
index 3f82be3116c48e983e4c9fd7f2672f6f979bd981..4b4b689e31711c5ab41d698d8a6deec1fb151f55 100644 (file)
@@ -277,8 +277,8 @@ GeomAPI_Shape::ShapeType shapeTypeByStr(std::string theShapeTypeStr)
 {
   GeomAPI_Shape::ShapeType aShapeType = GeomAPI_Shape::SHAPE;
 
-  std::transform(theShapeTypeStr.begin(), theShapeTypeStr.end(),
-                 theShapeTypeStr.begin(), ::tolower);
+  std::transform(theShapeTypeStr.begin(), theShapeTypeStr.end(), theShapeTypeStr.begin(),
+                 [](char c) { return static_cast<char>(::tolower(c)); });
 
   if(theShapeTypeStr == "compound") {
     aShapeType = GeomAPI_Shape::COMPOUND;
@@ -386,7 +386,8 @@ GeomAPI_Shape::ShapeType getShapeType(const ModelHighAPI_Selection& theSelection
 ModelAPI_AttributeTables::ValueType valueTypeByStr(const std::string& theValueTypeStr)
 {
   std::string aType = theValueTypeStr;
-  std::transform(aType.begin(), aType.end(), aType.begin(), ::tolower);
+  std::transform(aType.begin(), aType.end(), aType.begin(),
+                 [](char c) { return static_cast<char>(::tolower(c)); });
   if (aType == "boolean")
     return ModelAPI_AttributeTables::BOOLEAN;
   else if (aType == "integer")
@@ -546,10 +547,15 @@ static bool checkDump(SessionPtr theSession,
   return true;
 }
 
-bool checkPyDump(const std::string& theFilenameNaming,
-                 const std::string& theFilenameGeo,
-                 const std::string& theFilenameWeak,
-                 const checkDumpType theCheckType)
+bool checkPyDump(
+#ifdef _DEBUG
+  const std::string&, const std::string&, const std::string&,
+#else
+  const std::string& theFilenameNaming,
+  const std::string& theFilenameGeo,
+  const std::string& theFilenameWeak,
+#endif
+  const checkDumpType theCheckType)
 {
   static const std::string anErrorByNaming("checkPythonDump by naming");
   static const std::string anErrorByGeometry("checkPythonDump by geometry");
index 928351bf10f4ae4c31d38a76dd381bbf95deef9a..374fd3fd04b1c503a2ddce55ebc181b39b3315f0 100644 (file)
   #include "ModelHighAPI_Services.h"
   #include "ModelHighAPI_Tools.h"
 
+  #ifdef _MSC_VER
+  # pragma warning(disable: 4127) // conditional expression is constant
+  # pragma warning(disable: 4456) // declaration of variable hides previous local declaration
+  # pragma warning(disable: 4459) // declaration of variable hides global declaration
+  # pragma warning(disable: 4701) // potentially uninitialized local variable
+  # pragma warning(disable: 4703) // potentially uninitialized local pointer variable
+  #endif
+
 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_SWIG_H_ */
index adc6b27285d9fb163106928d398548fb077f93c8..8a40f176a55bb75ea6ef84a73d21b6f8f0b5e6d2 100644 (file)
@@ -29,6 +29,7 @@ ModuleBase_ActionInfo::ModuleBase_ActionInfo()
 ModuleBase_ActionInfo::ModuleBase_ActionInfo(const QString &theText)
 {
   initDefault();
+  text = theText;
 }
 
 ModuleBase_ActionInfo::ModuleBase_ActionInfo(const QIcon & theIcon, const QString &theText)
index d9badcbeb0db424974c9aaf6c593547323656bc6..c9a2002e4aa21eddb692713a0feecac22523b6ff 100644 (file)
@@ -51,7 +51,7 @@ public:
   /// \param theStyle a style of presentation
   /// \param theMode a drawing mode
   virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& aPM,
-    const Handle(Prs3d_Drawer)& theStyle, const Standard_Integer theMode = 0)
+    const Handle(Prs3d_Drawer)& theStyle, const Standard_Integer /*theMode*/ = 0)
   {
     Selectable()->HilightOwnerWithColor(aPM, theStyle, this);
   }
index d61fbe8bb828b0df845f9bbbe7a80c9ff8e551b2..557675b18a70f3745c42542e1eddd4a93e1ae3ab 100644 (file)
 #include <vector>
 #include <map>
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4100)
+#endif
+
 class QAction;
 class QMouseEvent;
 class QKeyEvent;
index 1aad9754b69dba0cb4cef16d3ae2c9a4c80dcd06..5edf3334ce9f08102a0b0010d564da7ddf57384a 100644 (file)
@@ -115,11 +115,11 @@ void ModuleBase_ISelection::filterSelectionOnEqualPoints
     std::shared_ptr<GeomAPI_Vertex> aGeomPrsVertex = getPresentationVertex(aPrs);
     if (aGeomPrsVertex.get()) {
       const TopoDS_Vertex& aPrsVertex = aGeomPrsVertex->impl<TopoDS_Vertex>();
-      std::set<std::shared_ptr<GeomAPI_Vertex> >::const_iterator anIt = aVerticesMap.begin(),
-                                                                 aLast = aVerticesMap.end();
+      std::set<std::shared_ptr<GeomAPI_Vertex> >::const_iterator aVIt = aVerticesMap.begin(),
+                                                                 aVLast = aVerticesMap.end();
       bool aFound = false;
-      for (; anIt != aLast && !aFound; anIt++) {
-        std::shared_ptr<GeomAPI_Vertex> aGeomVertex = *anIt;
+      for (; aVIt != aVLast && !aFound; aVIt++) {
+        std::shared_ptr<GeomAPI_Vertex> aGeomVertex = *aVIt;
         const TopoDS_Vertex& aVertex = aGeomVertex->impl<TopoDS_Vertex>();
         gp_Pnt aPoint1 = BRep_Tool::Pnt(aVertex);
         gp_Pnt aPoint2 = BRep_Tool::Pnt(aPrsVertex);
index 5fc4e8ed543414dfa47afb8022886ad03972ed96..551d868b22ae47170732c8899570ce3948e01ce7 100644 (file)
 #include <QIcon>
 #include <QVariant>
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4100)
+#endif
+
 class ModuleBase_ITreeNode;
 class ModuleBase_IWorkshop;
 
index 91070a455c6acedaa1a7856fbf55e08dd13a9e5c..624f1c0ae2fd42cd242dedc4451e739d588848d7 100644 (file)
 #include <string>
 #include <memory>
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4100)
+#endif
+
 class ModuleBase_ModelWidget;
 class ModuleBase_PageBase;
 class ModuleBase_IWorkshop;
@@ -52,7 +56,7 @@ public:
   /// Returns a container of possible page types, which this creator can process
   /// The default implementation is empty
   /// \param theTypes a list of type names
-  virtual void panelTypes(std::set<std::string>& theTypes) {}
+  virtual void panelTypes(std::set<std::string>& /*theTypes*/) {}
 
   /// Returns a container of possible page types, which this creator can process
   /// The default implementation is empty
index ff3ad3cdee58fb16c02bc696f2356bd6db05fcfd..cea25f232f7ed20766ead6b7964606c01e14919b 100644 (file)
 
 #include <memory>
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4100)
+#endif
+
 class Config_WidgetAPI;
 class Events_InfoMessage;
 class ModuleBase_IPropertyPanel;
index 1df6060a6325790e5504ad4e552620c276b537ca..e8eac4cf82456d5292592fbf8a2d0876e7dec97e 100644 (file)
@@ -159,7 +159,7 @@ void ModuleBase_Operation::onValuesChanged()
   myIsModified = true;
 }
 
-void ModuleBase_Operation::onValueStateChanged(int thePreviousState)
+void ModuleBase_Operation::onValueStateChanged(int /*thePreviousState*/)
 {
   if (propertyPanel()) {
     ModuleBase_ModelWidget* aWidget = propertyPanel()->activeWidget();
index 8b3b4c410a189909c3bc8d012f0943f7b27c9e29..ab66c3bf621a592a9dc6a1e4f604d40e968c26eb 100644 (file)
@@ -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;
           }
         }
       }
index 284e4bf7a84a01eeda0c7c8c3973bdfc571873f3..267d2d4cf19454094066a0c2be52a5682e166ac2 100644 (file)
@@ -48,9 +48,10 @@ ModuleBase_PagedContainer::~ModuleBase_PagedContainer()
 }
 
 int ModuleBase_PagedContainer::addPage(ModuleBase_PageBase* thePage,
-                                      const QString& theName, const QString& theCaseId,
-                                      const QPixmap& theIcon,
-                                      const QString& theTooltip)
+                                       const QString& /*theName*/,
+                                       const QString& theCaseId,
+                                       const QPixmap& /*theIcon*/,
+                                       const QString& /*theTooltip*/)
 {
   if (!myPages.count()) {
     setDefaultValue(theCaseId.toStdString());
index e3fdde3747aa4b9244c0e0b5391d4a40dd36fbaf..c2d4ab11b5a623c92ed5e0ea35f9ef1154a36fcd 100644 (file)
@@ -105,7 +105,7 @@ protected:
 
   /// The virtual function is reimplemented in order to avoid extra increasing of value by StepBy
   /// method
-  virtual void timerEvent(QTimerEvent *event) {}
+  virtual void timerEvent(QTimerEvent* /*event*/) {}
 
   virtual StepEnabled stepEnabled() const { return StepUpEnabled | StepDownEnabled; }
 
index 2caa00fb7967598a7f01cf6de1fe51ffd594a92b..9d3a5c616c0662116967b4c7d7057910804bef7e 100644 (file)
@@ -421,7 +421,7 @@ void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& a
 
 //********************************************************************
 bool ModuleBase_ResultPrs::appendVertexSelection(const Handle(SelectMgr_Selection)& aSelection,
-                                                 const Standard_Integer theMode)
+                                                 const Standard_Integer /*theMode*/)
 {
   if (Shape().ShapeType() == TopAbs_VERTEX) {
     const TopoDS_Shape& aShape = Shape();
index ff8281747d649cf21a45bc323e92614c23179b7d..bed15a9de6f5fd6ae099fb4fea10a6ee269ac1ce 100644 (file)
@@ -20,8 +20,8 @@
 #include <ModuleBase_SelectionValidator.h>
 
 
-bool ModuleBase_SelectionValidator::isValid(const ModuleBase_ISelection* theSelection,
-                                            ModuleBase_Operation* theOperation) const
+bool ModuleBase_SelectionValidator::isValid(const ModuleBase_ISelection* /*theSelection*/,
+                                            ModuleBase_Operation* /*theOperation*/) const
 {
   return true;
 }
index 40b17fe760bcc0c52359de858e64f4250322ee8b..a3697ee37f0c09d7f889585b732882b2b708af8e 100644 (file)
@@ -412,7 +412,7 @@ void checkObjects(const QObjectPtrList& theObjects, bool& hasResult, bool& hasFe
       hasCompositeOwner |= (ModelAPI_Tools::bodyOwner(aResult) != NULL);
 
     if (!hasResultInHistory && aResult.get()) {
-      FeaturePtr aFeature = ModelAPI_Feature::feature(aResult);
+      aFeature = ModelAPI_Feature::feature(aResult);
       hasResultInHistory = aFeature.get() && aFeature->isInHistory();
     }
 
index 425e60ae6a11f29078708577d6dc05be78cb2f01..2e28a3f93fae170d96148106cc9f721dfabcbd34 100644 (file)
@@ -168,7 +168,7 @@ void ModuleBase_WidgetConcealedObjects::addViewRow(
   }
 }
 
-void ModuleBase_WidgetConcealedObjects::onItemToggled(bool theState)
+void ModuleBase_WidgetConcealedObjects::onItemToggled(bool /*theState*/)
 {
   emit valuesChanged();
   updateObject(myFeature);
index 451a371ec4ce7745ff87ee5f3baaae17b79760bc..5d12d728af230f19d6a35ddb51520e3071c7a53a 100644 (file)
@@ -743,8 +743,6 @@ QIntList ModuleBase_WidgetMultiSelector::shapeTypes() const
 //********************************************************************
 void ModuleBase_WidgetMultiSelector::setCurrentShapeType(const int theShapeType)
 {
-  QString aShapeTypeName;
-
   int idx = 0;
   foreach (QString aShapeTypeName, myShapeTypes) {
     int aRefType = ModuleBase_Tools::shapeType(aShapeTypeName);
@@ -794,10 +792,10 @@ void ModuleBase_WidgetMultiSelector::updateSelectionList()
   else if (aType == ModelAPI_AttributeRefAttrList::typeId()) {
     AttributeRefAttrListPtr aRefAttrListAttr = aData->refattrlist(attributeID());
     for (int i = 0; i < aRefAttrListAttr->size(); i++) {
-      AttributePtr anAttribute = aRefAttrListAttr->attribute(i);
+      AttributePtr anAttr = aRefAttrListAttr->attribute(i);
       QString aName;
-      if (anAttribute.get()) {
-        std::string anAttrName = ModuleBase_Tools::generateName(anAttribute, myWorkshop);
+      if (anAttr.get()) {
+        std::string anAttrName = ModuleBase_Tools::generateName(anAttr, myWorkshop);
         aName = QString::fromStdString(anAttrName);
       }
       else {
@@ -910,9 +908,9 @@ void ModuleBase_WidgetMultiSelector::convertIndicesToViewerSelection(std::set<in
       if (!anObject.get())
         continue;
       TopoDS_Shape aShape;
-      AttributePtr anAttribute = aRefAttrListAttr->attribute(i);
-      if (anAttribute.get()) {
-        GeomShapePtr aGeomShape = ModuleBase_Tools::getShape(anAttribute, myWorkshop);
+      AttributePtr anAttr = aRefAttrListAttr->attribute(i);
+      if (anAttr.get()) {
+        GeomShapePtr aGeomShape = ModuleBase_Tools::getShape(anAttr, myWorkshop);
         theValues.append(std::shared_ptr<ModuleBase_ViewerPrs>(
                new ModuleBase_ViewerPrs(anObject, aGeomShape, NULL)));
       }
@@ -983,8 +981,8 @@ bool ModuleBase_WidgetMultiSelector::removeUnusedAttributeObjects
     for (int i = 0; i < aRefAttrListAttr->size(); i++) {
       bool aFound = false;
       if (aRefAttrListAttr->isAttribute(i)) {
-        AttributePtr anAttribute = aRefAttrListAttr->attribute(i);
-        aFound = anAttributes.find(anAttribute) != anAttributes.end();
+        AttributePtr anAttr = aRefAttrListAttr->attribute(i);
+        aFound = anAttributes.find(anAttr) != anAttributes.end();
       }
       else {
         aFound = findInSelection(aRefAttrListAttr->object(i), GeomShapePtr(), aGeomSelection,
index f7ed8ee1aa348e53427561a6fc31da00a03222a8..94f2f54c46c49eaa78c1f4b1b19c51c60800d5a1 100644 (file)
@@ -324,7 +324,7 @@ ModuleBase_WidgetSelectionFilter::~ModuleBase_WidgetSelectionFilter()
     aCtx->Remove(myPreview, false);
     myPreview.Nullify();
     if (myListIO.Size() > 0) {
-      Handle(AIS_InteractiveContext) aCtx = myWorkshop->viewer()->AISContext();
+      aCtx = myWorkshop->viewer()->AISContext();
       AIS_ListOfInteractive::const_iterator aIt;
       Handle(AIS_Shape) aShapeIO;
       for (aIt = myListIO.cbegin(); aIt != myListIO.cend(); aIt++) {
@@ -455,7 +455,6 @@ void ModuleBase_WidgetSelectionFilter::onSelect()
   int aNb = aDoc->size(ModelAPI_ResultBody::group());
   ObjectPtr aObj;
   ResultBodyPtr aBody;
-  GeomShapePtr aShape;
   for (int i = 0; i < aNb; i++) {
     aObj = aDoc->object(ModelAPI_ResultBody::group(), i);
     aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aObj);
@@ -465,15 +464,15 @@ void ModuleBase_WidgetSelectionFilter::onSelect()
     TopTools_MapOfShape alreadyThere;
     std::list<GeomShapePtr>::const_iterator aShapesIt;
     for (aShapesIt = aSubShapes.cbegin(); aShapesIt != aSubShapes.cend(); aShapesIt++) {
-      GeomShapePtr aShape = (*aShapesIt);
-      TopoDS_Shape aTShape = aShape->impl<TopoDS_Shape>();
+      GeomShapePtr aSubShape = (*aShapesIt);
+      TopoDS_Shape aTShape = aSubShape->impl<TopoDS_Shape>();
       if (!alreadyThere.Add(aTShape))
         continue;
       static SessionPtr aSession = ModelAPI_Session::get();
-      bool isValid = aSession->filters()->isValid(myFeature, aBody, aShape);
+      bool isValid = aSession->filters()->isValid(myFeature, aBody, aSubShape);
       if (isValid) {
         aBuilder.Add(aComp, aTShape);
-        ModuleBase_ViewerPrsPtr aValue(new ModuleBase_ViewerPrs(aObj, aShape));
+        ModuleBase_ViewerPrsPtr aValue(new ModuleBase_ViewerPrs(aObj, aSubShape));
         myValues.append(aValue);
       }
     }
index 30bf3060515ca408b46567010540e0a50916ee7b..7694a6207711019d3f73939ec497c1822f91e7cb 100644 (file)
@@ -215,7 +215,7 @@ bool ModuleBase_WidgetSelector::isValidSelectionCustom(const ModuleBase_ViewerPr
 
   if (aValid) {
     // In order to avoid selection of the same object
-    ResultPtr aResult = myWorkshop->selection()->getResult(thePrs);
+    aResult = myWorkshop->selection()->getResult(thePrs);
     FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(aResult);
     aValid = aSelectedFeature != myFeature;
   }
index af4f04e985f7ac224306375f6f6e6be0767ee0b3..feb6a380a24c291d93119642122fd36d5be7e409 100644 (file)
@@ -155,28 +155,28 @@ bool ModuleBase_WidgetValidated::isValidInFilters(const ModuleBase_ViewerPrsPtr&
           AttributeSelectionPtr aSelectAttr =
             std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(anAttr);
           aSelectAttr->setValue(myPresentedObject, GeomShapePtr(), true);
-          GeomShapePtr aShape = aSelectAttr->value();
-          if (!aShape.get() && aSelectAttr->contextFeature().get() &&
+          GeomShapePtr aShapePtr = aSelectAttr->value();
+          if (!aShapePtr.get() && aSelectAttr->contextFeature().get() &&
             aSelectAttr->contextFeature()->firstResult().get()) {
-            aShape = aSelectAttr->contextFeature()->firstResult()->shape();
+            aShapePtr = aSelectAttr->contextFeature()->firstResult()->shape();
           }
-          if (aShape.get()) {
-            const TopoDS_Shape aTDShape = aShape->impl<TopoDS_Shape>();
+          if (aShapePtr.get()) {
+            const TopoDS_Shape aTDShape = aShapePtr->impl<TopoDS_Shape>();
             Handle(AIS_InteractiveObject) anIO = myWorkshop->selection()->getIO(thePrs);
             aOwnersList.Append(new StdSelect_BRepOwner(aTDShape, anIO));
           }
         }
         else {
-          ResultPtr aResult = aFeature->firstResult();
-          if (aResult.get()) {
-            ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aResult);
+          ResultPtr aFirstRes = aFeature->firstResult();
+          if (aFirstRes.get()) {
+            ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aFirstRes);
             if (aBody.get() && (aBody->numberOfSubs() > 0))
               collectSubBodies(aBody, aOwnersList);
             else {
-              GeomShapePtr aShapePtr = ModelAPI_Tools::shape(aResult);
+              GeomShapePtr aShapePtr = ModelAPI_Tools::shape(aFirstRes);
               if (aShapePtr.get()) {
                 TopoDS_Shape aTDShape = aShapePtr->impl<TopoDS_Shape>();
-                AISObjectPtr aIOPtr = myWorkshop->findPresentation(aResult);
+                AISObjectPtr aIOPtr = myWorkshop->findPresentation(aFirstRes);
                 if (aIOPtr.get()) {
                   Handle(AIS_InteractiveObject) anIO =
                     aIOPtr->impl<Handle(AIS_InteractiveObject)>();
index bd71032db91e0f224bde994ef1806e030a168f11..71a7b55cbffcf135d4894f30781252a9fa4d2827 100644 (file)
@@ -53,7 +53,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetValidator
   /// Fills given container with selection modes if the widget has it
   /// \param [out] theModuleSelectionModes module additional modes, -1 means all default modes
   /// \param theModes [out] a container of modes
-  virtual void selectionModes(int& theModuleSelectionModes, QIntList& theModes) {}
+  virtual void selectionModes(int& /*theModuleSelectionModes*/, QIntList& /*theModes*/) {}
 
   /// Appends into container of workshop selection filters
   /// \param [out] theModuleSelectionFilters module additional modes, -1 means all default modes
index 49121ea3a9f37c64fc16d1c4d486fd52f36f8cbe..9d77b3e294fb92e2b8286a545d186475d8aaf294 100644 (file)
@@ -137,7 +137,8 @@ void ParametersPlugin_Parameter::execute()
     setError("Expression error.", false);
 }
 
-double ParametersPlugin_Parameter::evaluate(const std::string& theExpression, std::string& theError)
+double ParametersPlugin_Parameter::evaluate(const std::string& /*theExpression*/,
+                                            std::string& theError)
 {
   FeaturePtr aMyPtr = std::dynamic_pointer_cast<ModelAPI_Feature>(data()->owner());
   std::shared_ptr<ModelAPI_ParameterEvalMessage> aProcessMessage =
index ff9f6d53c7abb4eca06a3f23b5827af608f331b7..e9f49ffe509627d8e75a250fc0561403a5f7739e 100644 (file)
@@ -38,7 +38,7 @@ ParametersPlugin_VariableValidator::~ParametersPlugin_VariableValidator()
 }
 
 bool ParametersPlugin_VariableValidator::isValid(const AttributePtr& theAttribute,
-                                                 const std::list<std::string>& theArguments,
+                                                 const std::list<std::string>& /*theArguments*/,
                                                  Events_InfoMessage& theError) const
 {
   AttributeStringPtr aStrAttr = std::dynamic_pointer_cast<ModelAPI_AttributeString>(theAttribute);
@@ -95,7 +95,7 @@ ParametersPlugin_ExpressionValidator::~ParametersPlugin_ExpressionValidator()
 }
 
 bool ParametersPlugin_ExpressionValidator::isValid(const AttributePtr& theAttribute,
-                                                   const std::list<std::string>& theArguments,
+                                                   const std::list<std::string>& /*theArguments*/,
                                                    Events_InfoMessage& theError) const
 {
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
index ef597c0331252fa0a822ba3e9d0324363e0ca755..bd89f9a80fba21011262cc233d8a62e563ad51b1 100644 (file)
@@ -455,8 +455,7 @@ QList<QStringList> ParametersPlugin_WidgetParamsMgr::
     } else
       aValues << aExpr.c_str();
 
-    std::string aErr =
-      aParameter->data()->string(ParametersPlugin_Parameter::EXPRESSION_ERROR_ID())->value();
+    aErr = aParameter->data()->string(ParametersPlugin_Parameter::EXPRESSION_ERROR_ID())->value();
     if (aErr.empty()) {
       AttributeDoublePtr aValueAttribute = aParam->data()->real(ModelAPI_ResultParameter::VALUE());
       aValues << QString::number(aValueAttribute->value());
index c1d2ff9ff8cf32d100c3d8c8806c2964a7e0b685..4b1f076effc825918cc04d062a39ac51384422fc 100644 (file)
@@ -75,7 +75,7 @@ void PartSet_CenterPrs::drawPoint(const Handle(Prs3d_Presentation)& thePrs,
 }
 
 void PartSet_CenterPrs::HilightSelected(const Handle(PrsMgr_PresentationManager3d)& PM,
-                                        const SelectMgr_SequenceOfOwner& Seq)
+                                        const SelectMgr_SequenceOfOwner& /*Seq*/)
 {
   Handle( Prs3d_Presentation ) aSelectionPrs = GetSelectPresentation( PM );
   aSelectionPrs->Clear();
@@ -89,7 +89,7 @@ void PartSet_CenterPrs::HilightSelected(const Handle(PrsMgr_PresentationManager3
 
 void PartSet_CenterPrs::HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM,
                                               const Handle(Prs3d_Drawer)& theStyle,
-                                              const Handle(SelectMgr_EntityOwner)& theOwner)
+                                              const Handle(SelectMgr_EntityOwner)& /*theOwner*/)
 {
   Handle( Prs3d_Presentation ) aHilightPrs = GetHilightPresentation( thePM );
   aHilightPrs->Clear();
index 877237fca13156357f8b2d3dfb74c39dd7c3528f..7f17c1139404b89b29e820af9780f5d9f381e9f4 100644 (file)
@@ -167,7 +167,7 @@ void PartSet_ExternalObjectsMgr::removeExternal(const CompositeFeaturePtr& theSk
 
 void PartSet_ExternalObjectsMgr::removeExternalObject(const ObjectPtr& theObject,
                                                       const CompositeFeaturePtr& /*theSketch*/,
-                                                      const FeaturePtr& theFeature,
+                                                      const FeaturePtr& /*theFeature*/,
                                                       ModuleBase_IWorkshop* theWorkshop)
 {
   if (theObject.get()) {
index ec091abe1a008d6fbb68d435fc98cb6f1111df79..37d64c6c970dd4c15b2c0f053e400ec8fa9e7407 100644 (file)
@@ -46,7 +46,7 @@ IMPLEMENT_STANDARD_RTTIEXT(PartSet_FieldStepPrs, ViewerData_AISShape);
 #define POINT_SIZE 8
 
 
-void emptyDeleter(ModelAPI_ResultField* theF)
+void emptyDeleter(ModelAPI_ResultField* /*theF*/)
 {
   // Do nothing
 }
index d3c508a5bb934fada9b1e0c120ef7f7ab4efaab8..640f9f82738efcd97db7f348030987b46515927d 100644 (file)
@@ -173,8 +173,8 @@ bool PartSet_MenuMgr::addViewerMenu(const QMap<QString, QAction*>& theStdActions
 
         // Find coincident in these coordinates
         ObjectPtr aObj = aPrsList.first()->object();
-        FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
-        FeaturePtr aCoincident = PartSet_Tools::findFirstCoincidence(aFeature, aSelPnt);
+        FeaturePtr aCoincident =
+            PartSet_Tools::findFirstCoincidence(ModelAPI_Feature::feature(aObj), aSelPnt);
         // If we have coincidence then add Detach menu
         if (aCoincident.get() != NULL) {
           QList<FeaturePtr> aCoins;
@@ -192,8 +192,8 @@ bool PartSet_MenuMgr::addViewerMenu(const QMap<QString, QAction*>& theStdActions
             theMenuActions[anIndex++] = aSubMenu->menuAction();
             QAction* aAction;
             int i = 0;
-            foreach (FeaturePtr aCoins, myCoinsideLines) {
-              QString anItemText = aCoins->data()->name().c_str();
+            foreach (FeaturePtr aCoinsL, myCoinsideLines) {
+              QString anItemText = aCoinsL->data()->name().c_str();
 #ifdef _DEBUG
               if (anIsAttributes[i])
                 anItemText += " [attribute]";
index 4a3f99f316e58f9aecaa781f2f952475a4d3db16..13619e05c9b62bf650fe2a0a81d4a2649f1bb75c 100644 (file)
 
 #include <memory>
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4100)
+#endif
+
 class ModuleBase_IViewWindow;
 class ModuleBase_ViewerPrs;
 class QMouseEvent;
index b6f0e49538adc4ffa0ec9bd40540366bd7430adf..07faae3c454cbdc2ed657c73a9cea4585bc9c6e0 100644 (file)
@@ -228,9 +228,9 @@ void PartSet_OperationPrs::addValue(const ObjectPtr& theObject, const GeomShapeP
 
     GeomShapePtr aShape = theShape;
     if (!aShape.get()) {
-      ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
-      if (aResult.get())
-        aShape = aResult->shape();
+      ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+      if (aRes.get())
+        aShape = aRes->shape();
     }
     if (!isSubObject(theObject, theFeature))
       appendShapeIfVisible(theWorkshop, theObject, aShape, theObjectShapes);
@@ -320,19 +320,19 @@ void PartSet_OperationPrs::getFeatureShapes(const FeaturePtr& theFeature,
       ObjectPtr anObject;
       GeomShapePtr aShape;
       if (anAttrType == ModelAPI_AttributeRefAttr::typeId()) {
-        AttributeRefAttrPtr anAttr =
+        AttributeRefAttrPtr aRefAttr =
           std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(anAttribute);
-        if (anAttr->isObject()) {
-          anObject = anAttr->object();
+        if (aRefAttr->isObject()) {
+          anObject = aRefAttr->object();
         }
         else {
-          AttributePtr anAttribute = anAttr->attr();
-          aShape = PartSet_Tools::findShapeBy2DPoint(anAttribute, theWorkshop);
+          AttributePtr anAttr = aRefAttr->attr();
+          aShape = PartSet_Tools::findShapeBy2DPoint(anAttr, theWorkshop);
           // the distance point is not found if the point is selected in the 2nd time
           // TODO: after debug, this check can be removed
           if (!aShape.get())
             continue;
-          anObject = anAttr->attr()->owner();
+          anObject = anAttr->owner();
         }
       }
       if (anAttrType == ModelAPI_AttributeSelection::typeId()) {
index 67dd02e0940d3e62654385d749e536b650eb4e3e..b83637655b3bc934f60ca1f132a2f15b94a42765 100644 (file)
@@ -97,7 +97,6 @@ void PartSet_OverconstraintListener::getCustomColor(const ObjectPtr& theObject,
     theColor = Config_PropManager::color("Visualization", "sketch_overconstraint_color");
   }
   if (myIsFullyConstrained) {
-    FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
     // only entity features has custom color when sketch is fully constrained
     if (aFeature.get() && PartSet_SketcherMgr::isEntity(aFeature->getKind()) &&
         !PartSet_SketcherMgr::isExternalFeature(aFeature)) {
index aaa1ff6d4d2691785d3bf9c47ed343f419fa7386..2a494636f05c50321b0e369282019ad38e76ce7e 100644 (file)
@@ -519,12 +519,12 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
         launchEditing();
       myIsEditLaunching = aPrevLaunchingState;
       if (aFeature.get() != NULL) {
-        std::shared_ptr<SketchPlugin_Feature> aSPFeature =
+        std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
                   std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
-        if (aSPFeature.get() &&
-          (aSPFeature->getKind() == SketchPlugin_ConstraintRadius::ID() ||
-           aSPFeature->getKind() == SketchPlugin_ConstraintAngle::ID())) {
-          DataPtr aData = aSPFeature->data();
+        if (aSketchFeature.get() &&
+           (aSketchFeature->getKind() == SketchPlugin_ConstraintRadius::ID() ||
+            aSketchFeature->getKind() == SketchPlugin_ConstraintAngle::ID())) {
+          DataPtr aData = aSketchFeature->data();
           AttributePtr aAttr = aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT());
           std::shared_ptr<GeomDataAPI_Point2D> aFPAttr =
             std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aAttr);
@@ -1171,9 +1171,8 @@ void PartSet_SketcherMgr::startSketch(ModuleBase_Operation* theOperation)
 #ifdef DEBUG_SKETCHER_ENTITIES
     anInfo.append(ModuleBase_Tools::objectInfo(aFeature));
 #endif
-    std::list<ResultPtr> aResults = aFeature->results();
-    std::list<ResultPtr>::const_iterator aIt;
-    for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) {
+    std::list<ResultPtr> aFeatResults = aFeature->results();
+    for (aIt = aFeatResults.begin(); aIt != aFeatResults.end(); ++aIt) {
       if ((*aIt)->isDisplayed())
         // Display object if it was created outside of GUI
         aECreator->sendUpdated((*aIt), EVENT_DISP);
@@ -1712,7 +1711,7 @@ bool PartSet_SketcherMgr::setDistanceValueByPreselection(ModuleBase_Operation* t
             anAISIO = anAIS->impl<Handle(AIS_InteractiveObject)>();
           }
           if (anAIS.get() != NULL) {
-            Handle(AIS_InteractiveObject) anAISIO = anAIS->impl<Handle(AIS_InteractiveObject)>();
+            anAISIO = anAIS->impl<Handle(AIS_InteractiveObject)>();
 
             if (!anAISIO.IsNull()) {
               Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(anAISIO);
@@ -1786,10 +1785,10 @@ void PartSet_SketcherMgr::getSelectionOwners(const FeaturePtr& theFeature,
   }
   for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) {
     ResultPtr aResult = *aIt;
-    AISObjectPtr aAISObj = aDisplayer->getAISObject(aResult);
-    if (aAISObj.get() == NULL)
+    AISObjectPtr aResAISObj = aDisplayer->getAISObject(aResult);
+    if (aResAISObj.get() == NULL)
       continue;
-    Handle(AIS_InteractiveObject) anAISIO = aAISObj->impl<Handle(AIS_InteractiveObject)>();
+    Handle(AIS_InteractiveObject) anAISIO = aResAISObj->impl<Handle(AIS_InteractiveObject)>();
 
     SelectMgr_IndexedMapOfOwner aSelectedOwners;
     aConnector->workshop()->selector()->selection()->entityOwners(anAISIO, aSelectedOwners);
@@ -2011,8 +2010,8 @@ void PartSet_SketcherMgr::storeSelection(const SelectionType theType,
       std::list<ResultPtr> aResults = aFeature->results();
       std::list<ResultPtr>::const_iterator aIt;
       for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) {
-        ResultPtr aResult = *aIt;
-        getAttributesOrResults(anOwner, aFeature, aSketch, aResult,
+        ResultPtr aCurResult = *aIt;
+        getAttributesOrResults(anOwner, aFeature, aSketch, aCurResult,
           anInfo.myAttributes, anInfo.myResults, anInfo.myLocalSelectedShapes);
       }
     }
@@ -2225,9 +2224,9 @@ void PartSet_SketcherMgr::processEvent(const std::shared_ptr<Events_Message>& th
       FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*aIt);
       if (aFeature.get()) {
         std::list<ResultPtr> aRes = aFeature->results();
-        std::list<ResultPtr>::const_iterator aIt;
-        for (aIt = aRes.cbegin(); aIt != aRes.cend(); ++aIt) {
-          ModuleBase_ViewerPrsPtr aPrsPtr(new ModuleBase_ViewerPrs(*aIt));
+        std::list<ResultPtr>::const_iterator aRIt;
+        for (aRIt = aRes.cbegin(); aRIt != aRes.cend(); ++aRIt) {
+          ModuleBase_ViewerPrsPtr aPrsPtr(new ModuleBase_ViewerPrs(*aRIt));
           aPrsList.append(aPrsPtr);
         }
       }
@@ -2359,8 +2358,8 @@ void PartSet_SketcherMgr::customizeSketchPresentation(const ObjectPtr& theObject
     //  thePrs->setPointMarker(1, 1.); // Set point as a '+' symbol
   }
   if (isCopy(aFeature) && !isIncludeToResult(aFeature)) {
-    double aWidth = thePrs->width();
-    thePrs->setWidth(aWidth / 2.5);
+    double aPrsWidth = thePrs->width();
+    thePrs->setWidth(aPrsWidth / 2.5);
   }
 
   double aDeflection = Config_PropManager::real("Visualization", "construction_deflection");
@@ -2397,10 +2396,10 @@ void PartSet_Fitter::fitAll(Handle(V3d_View) theView)
       for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) {
         aRes = (*aIt);
         if (aRes->isDisplayed()) {
-          FeaturePtr aFeature = ModelAPI_Feature::feature(aRes);
-          if (aFeature.get()) {
+          FeaturePtr aCurFeature = ModelAPI_Feature::feature(aRes);
+          if (aCurFeature.get()) {
             std::shared_ptr<SketchPlugin_Feature> aSPFeature =
-              std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
+                std::dynamic_pointer_cast<SketchPlugin_Feature>(aCurFeature);
             if (aSPFeature.get()) {
               bool isAxiliary =
                 aSPFeature->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value();
index 0ebd810fa28880056e19f636d0b30442d4095804..767df1296c5e2e6156a1debf02ed6c4e2a7e0fc5 100644 (file)
@@ -188,8 +188,8 @@ bool PartSet_SketcherReentrantMgr::processMouseMoved(ModuleBase_IViewWindow* the
         }
       } else {
         // processing mouse move in active widget of restarted operation
-        ModuleBase_ModelWidget* anActiveWidget = module()->activeWidget();
-        PartSet_MouseProcessor* aProcessor = dynamic_cast<PartSet_MouseProcessor*>(anActiveWidget);
+        ModuleBase_ModelWidget* anActiveWdg = module()->activeWidget();
+        PartSet_MouseProcessor* aProcessor = dynamic_cast<PartSet_MouseProcessor*>(anActiveWdg);
         if (aProcessor)
           aProcessor->mouseMoved(theWnd, theEvent);
       }
index c7aed7b39669c37fede94bad6d6a737bf3eba0be..4934187cd2886af1b3fcfddf0ac77ea429a75006 100644 (file)
@@ -562,9 +562,9 @@ FeaturePtr PartSet_Tools::findFirstCoincidence(const FeaturePtr& theFeature,
   /// Find by result
   if (!aCoincident.get()) {
     std::list<ResultPtr> aResults = theFeature->results();
-    std::list<ResultPtr>::const_iterator aIt;
-    for (aIt = aResults.cbegin(); aIt != aResults.cend(); ++aIt) {
-      ResultPtr aResult = *aIt;
+    std::list<ResultPtr>::const_iterator aResIt;
+    for (aResIt = aResults.cbegin(); aResIt != aResults.cend(); ++aResIt) {
+      ResultPtr aResult = *aResIt;
       aCoincident = findFirstCoincidenceByData(aResult->data(), thePoint);
       if (aCoincident.get())
         break;
@@ -598,8 +598,8 @@ void PartSet_Tools::findCoincidences(FeaturePtr theStartCoin, QList<FeaturePtr>&
         FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aAttr->owner());
         if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) {
           if (!theCoincidencies.contains(aConstrFeature)) {
-            std::shared_ptr<GeomAPI_Pnt2d> aPnt = getCoincedencePoint(aConstrFeature);
-            if (aPnt.get() && aOrig->isEqual(aPnt)) {
+            std::shared_ptr<GeomAPI_Pnt2d> aCoincPnt = getCoincedencePoint(aConstrFeature);
+            if (aCoincPnt.get() && aOrig->isEqual(aCoincPnt)) {
               findCoincidences(aConstrFeature, theList, theCoincidencies,
                 SketchPlugin_ConstraintCoincidence::ENTITY_A(), theIsAttributes);
               findCoincidences(aConstrFeature, theList, theCoincidencies,
@@ -613,9 +613,9 @@ void PartSet_Tools::findCoincidences(FeaturePtr theStartCoin, QList<FeaturePtr>&
     // Find by Results
     ResultConstructionPtr aResult = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aObj);
     if (aResult.get()) {
-      FeaturePtr aFeature = ModelAPI_Feature::feature(aPnt->object());
-      if (!theList.contains(aFeature))
-        theList.append(aFeature);
+      FeaturePtr aFeat = ModelAPI_Feature::feature(aPnt->object());
+      if (!theList.contains(aFeat))
+        theList.append(aFeat);
       theCoincidencies.append(theStartCoin);
       theIsAttributes.append(false); // point attribute on a feature
 
@@ -626,8 +626,8 @@ void PartSet_Tools::findCoincidences(FeaturePtr theStartCoin, QList<FeaturePtr>&
         FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aAttr->owner());
         if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) {
           if (!theCoincidencies.contains(aConstrFeature)) {
-            std::shared_ptr<GeomAPI_Pnt2d> aPnt = getCoincedencePoint(aConstrFeature);
-            if (aPnt.get() && aOrig->isEqual(aPnt)) {
+            std::shared_ptr<GeomAPI_Pnt2d> aCoincPnt = getCoincedencePoint(aConstrFeature);
+            if (aCoincPnt.get() && aOrig->isEqual(aCoincPnt)) {
               findCoincidences(aConstrFeature, theList, theCoincidencies,
                 SketchPlugin_ConstraintCoincidence::ENTITY_A(), theIsAttributes);
               findCoincidences(aConstrFeature, theList, theCoincidencies,
index 4f2265f5027583056f154b3216e6758234edff44..c63a5eb3a7fb4a7faec1681a457544a002a33d9b 100644 (file)
@@ -296,8 +296,8 @@ void PartSet_ObjectNode::update()
       aNode = myChildren.takeLast();
       delete aNode;
     }
-    foreach(ModuleBase_ITreeNode* aNode, myChildren) {
-      aNode->update();
+    foreach(ModuleBase_ITreeNode* aChildNode, myChildren) {
+      aChildNode->update();
     }
   }
   else {
@@ -351,8 +351,8 @@ QTreeNodesList PartSet_ObjectNode::objectCreated(const QObjectPtrList& theObject
         }
       }
     }
-    foreach(ModuleBase_ITreeNode* aNode, myChildren) {
-      aResult.append(aNode->objectCreated(theObjects));
+    foreach(ModuleBase_ITreeNode* aChildNode, myChildren) {
+      aResult.append(aChildNode->objectCreated(theObjects));
     }
   }
   return aResult;
@@ -389,10 +389,10 @@ QTreeNodesList PartSet_ObjectNode::objectsDeleted(
         aResult.append(this);
       int i = 0;
       ObjectPtr aBody;
-      foreach(ModuleBase_ITreeNode* aNode, myChildren) {
+      foreach(ModuleBase_ITreeNode* aChildNode, myChildren) {
         aBody = subObject(i);
-        ((PartSet_ObjectNode*)aNode)->setObject(aBody);
-        aResult.append(aNode->objectsDeleted(theDoc, theGroup));
+        ((PartSet_ObjectNode*)aChildNode)->setObject(aBody);
+        aResult.append(aChildNode->objectsDeleted(theDoc, theGroup));
         i++;
       }
     }
@@ -1119,7 +1119,7 @@ void PartSet_ObjectFolderNode::update()
   }
 }
 
-QTreeNodesList PartSet_ObjectFolderNode::objectCreated(const QObjectPtrList& theObjects)
+QTreeNodesList PartSet_ObjectFolderNode::objectCreated(const QObjectPtrList& /*theObjects*/)
 {
   QTreeNodesList aResult;
   int aFirst = -1, aLast = -1;
@@ -1153,8 +1153,8 @@ QTreeNodesList PartSet_ObjectFolderNode::objectCreated(const QObjectPtrList& the
   return aResult;
 }
 
-QTreeNodesList PartSet_ObjectFolderNode::objectsDeleted(const DocumentPtr& theDoc,
-  const QString& theGroup)
+QTreeNodesList PartSet_ObjectFolderNode::objectsDeleted(const DocumentPtr& /*theDoc*/,
+  const QString& /*theGroup*/)
 {
   QTreeNodesList aResult;
   int aFirst = -1, aLast = -1;
index f65ed4adb34084faff86b4cf32d573e43138bbc7..d54d0caeec06bf201e1dc04275f1bfcafc84fb8e 100644 (file)
@@ -454,11 +454,11 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
     }
   }
   else if (anAttrType == ModelAPI_AttributeSelection::typeId()) {
-    AttributeSelectionPtr anAttr =
+    AttributeSelectionPtr anAttrSel =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
-    ResultPtr aContext = anAttr->context();
-    FeaturePtr aContextFeature = anAttr->contextFeature();
-    GeomShapePtr aShape = anAttr->value();
+    ResultPtr aContext = anAttrSel->context();
+    FeaturePtr aContextFeature = anAttrSel->contextFeature();
+    GeomShapePtr aShape = anAttrSel->value();
 
     // Check selection attributes
     anAttrs = aFeature->data()->attributes(ModelAPI_AttributeSelection::typeId());
@@ -499,9 +499,9 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
     }
   }
   else if (anAttrType == ModelAPI_AttributeReference::typeId()) {
-    AttributeReferencePtr anAttr =
+    AttributeReferencePtr anAttrRef =
       std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
-    ObjectPtr anObject = anAttr->value();
+    ObjectPtr anObject = anAttrRef->value();
     // Check selection attributes
     anAttrs = aFeature->data()->attributes(ModelAPI_AttributeReference::typeId());
     if (anAttrs.size() > 0) {
@@ -517,8 +517,8 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
             return false;
           }
         }
-        return true;
       }
+      return true;
     }
   }
   else if(anAttrType == ModelAPI_AttributeSelectionList::typeId()) {
index f8cdc2c765bcb1916de30e14c3e08f2ba41cc783..5fe28ccc83abd3bbd8118f15f7a163391de181d4 100644 (file)
@@ -438,7 +438,6 @@ void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp)
   AttributeSelectionListPtr anAttrList = myFeature->data()->selectionList(myAttributeListID);
   if (aCompFeature->numberOfSubs() > 0) {
     // set the sub feature to attribute selection list and check whether sketch is valid
-    SessionPtr aMgr = ModelAPI_Session::get();
     const static std::string aNestedOpID("Set Sketch result into Selection list");
     aMgr->startOperation(aNestedOpID, false); // false to not attach to Extrusion operation
     setSketchObjectToList(aCompFeature, anAttrList);
@@ -512,7 +511,6 @@ void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp)
                                     (aData->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID()));
       ResultPtr aRes = aSelAttr.get() ? aSelAttr->context() : ResultPtr();
       if (aRes.get()) {
-        SessionPtr aMgr = ModelAPI_Session::get();
         ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
         AttributePtr anAttribute = myFeature->attribute(anObjectsAttribute);
         std::string aValidatorID;
index f0ec77b085b9f22bd1581514edecf4a6ccc1c94e..a076560ada3a4e099a2183e85da3e77982f0b7af 100644 (file)
@@ -486,8 +486,6 @@ bool PartSet_WidgetSketchLabel::canFillSketch(const ModuleBase_ViewerPrsPtr& the
   }
   // check plane or planar face of any non-sketch object
   if (aCanFillSketch) {
-    std::shared_ptr<GeomAPI_Face> aGeomFace;
-
     GeomShapePtr aGeomShape = thePrs->shape();
     if ((!aGeomShape.get() || aGeomShape->isNull()) && aResult.get()) {
       aGeomShape = aResult->shape();
@@ -540,13 +538,13 @@ bool PartSet_WidgetSketchLabel::fillSketchPlaneBySelection(const ModuleBase_View
       }
       else {
         aSelAttr->setValue(aFeature, GeomShapePtr());
-        GeomShapePtr aShape = aSelAttr->value();
-        if (!aShape.get() && aSelAttr->contextFeature().get() &&
+        GeomShapePtr aSelShape = aSelAttr->value();
+        if (!aSelShape.get() && aSelAttr->contextFeature().get() &&
           aSelAttr->contextFeature()->firstResult().get()) {
-          aShape = aSelAttr->contextFeature()->firstResult()->shape();
+          aSelShape = aSelAttr->contextFeature()->firstResult()->shape();
         }
-        if (aShape.get() && aShape->isPlanar()) {
-          const TopoDS_Shape& aTDShape = aShape->impl<TopoDS_Shape>();
+        if (aSelShape.get() && aSelShape->isPlanar()) {
+          const TopoDS_Shape& aTDShape = aSelShape->impl<TopoDS_Shape>();
           setSketchPlane(aTDShape);
           isOwnerSet = true;
         }
index ff294372287cf41a3efc54445a84dbef57ada5dc..c94e6dfe610600649594e72e87c3ff508d2af05f 100644 (file)
@@ -74,7 +74,7 @@ std::shared_ptr<ModelAPI_Feature> PartSetPlugin_Part::addFeature(std::string the
   return FeaturePtr();
 }
 
-int PartSetPlugin_Part::numberOfSubs(bool forTree) const
+int PartSetPlugin_Part::numberOfSubs(bool /*forTree*/) const
 {
   ResultPartPtr aResult = std::dynamic_pointer_cast<ModelAPI_ResultPart>(firstResult());
   if (aResult.get()) {
@@ -85,7 +85,8 @@ int PartSetPlugin_Part::numberOfSubs(bool forTree) const
   return 0;
 }
 
-std::shared_ptr<ModelAPI_Feature> PartSetPlugin_Part::subFeature(const int theIndex, bool forTree)
+std::shared_ptr<ModelAPI_Feature> PartSetPlugin_Part::subFeature(const int theIndex,
+                                                                 bool /*forTree*/)
 {
   ResultPartPtr aResult = std::dynamic_pointer_cast<ModelAPI_ResultPart>(firstResult());
   if (aResult.get()) {
index 6fa120db955b16b56aa4eb3562119f812b1391ab..d93241f73a1e8fa2041ba26e6a89f3b4749a489d 100644 (file)
@@ -48,7 +48,7 @@ bool Selector_Primitive::restore()
 }
 
 TDF_Label Selector_Primitive::restoreByName(std::string theName,
-  const TopAbs_ShapeEnum theShapeType, Selector_NameGenerator* theNameGenerator)
+  const TopAbs_ShapeEnum /*theShapeType*/, Selector_NameGenerator* theNameGenerator)
 {
   TDF_Label aContext;
   if (theNameGenerator->restoreContext(theName, aContext, myFinal)) {
index 8678c71ab2a7c5af7766e91a6142957a514ff4ef..9bdecc85f2d860c1dcc78d0176039527f52d0c43 100644 (file)
@@ -918,7 +918,8 @@ std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::setAngle(
 
   if (aVersion == SketchPlugin_ConstraintAngle::THE_VERSION_1) {
     std::string aTypeLC = theType;
-    std::transform(aTypeLC.begin(), aTypeLC.end(), aTypeLC.begin(), ::tolower);
+    std::transform(aTypeLC.begin(), aTypeLC.end(), aTypeLC.begin(),
+                   [](char c) { return static_cast<char>(::tolower(c)); });
     if (aTypeLC == "supplementary")
       aType = (int)SketcherPrs_Tools::ANGLE_COMPLEMENTARY;
     else if (aTypeLC == "backward")
index a663675c112abc5a3a168fa12c957d050394c7a9..4bed76ce3fa013656e1f4fb3d9f13c2033c1c1b6 100644 (file)
@@ -108,7 +108,8 @@ bool SketchPlugin_BSplineBase::isFixed() {
   return data()->selection(EXTERNAL_ID())->context().get() != NULL;
 }
 
-void SketchPlugin_BSplineBase::attributeChanged(const std::string& theID) {
+void SketchPlugin_BSplineBase::attributeChanged(const std::string& /*theID*/)
+{
 }
 
 bool SketchPlugin_BSplineBase::customAction(const std::string& theActionId)
index e705bdd4ffb4e04b301536e0d68cd72cc4578602..936163dc6f011938e67ca43afd9ecf1f6136adb3 100644 (file)
@@ -407,7 +407,6 @@ std::string SketchPlugin_MacroArc::processEvent(const std::shared_ptr<Events_Mes
     if(anArcType == ARC_TYPE_BY_TANGENT_EDGE()) {
       aFilledAttributeName = TANGENT_POINT_ID();
       AttributeRefAttrPtr aRefAttr = refattr(aFilledAttributeName);
-      FeaturePtr aCreatedFeature = aReentrantMessage->createdFeature();
       aRefAttr->setAttr(aCreatedFeature->attribute(SketchPlugin_Arc::END_ID()));
     }
     else if (anArcType == ARC_TYPE_BY_TRANSVERSAL_LINE()) {
@@ -445,7 +444,6 @@ std::string SketchPlugin_MacroArc::processEvent(const std::shared_ptr<Events_Mes
           if (aRefAttr.get()) {
             if (anAttribute.get()) {
               if (!anAttribute->owner().get() || !anAttribute->owner()->data()->isValid()) {
-                FeaturePtr aCreatedFeature = aReentrantMessage->createdFeature();
                 if (aCreatedFeature.get()) {
                   std::string anID = anAttribute->id();
                   std::string anArcID;
index 6e453b9c7f07a471c47fc848949afee136459f40..6822989a2595b3f2ad58a405904b97c9f9f50dae 100644 (file)
@@ -126,7 +126,6 @@ std::string SketchPlugin_MacroCircle::processEvent(
   std::shared_ptr<SketchPlugin_MacroArcReentrantMessage> aReentrantMessage =
         std::dynamic_pointer_cast<SketchPlugin_MacroArcReentrantMessage>(theMessage);
   if (aReentrantMessage.get()) {
-    FeaturePtr aCreatedFeature = aReentrantMessage->createdFeature();
     std::string aCircleType = aReentrantMessage->typeOfCreation();
 
     string(CIRCLE_TYPE())->setValue(aCircleType);
@@ -289,10 +288,10 @@ void SketchPlugin_MacroCircle::fillByThreePoints()
       aCircBuilder.addPassingPoint(aPassedPoint);
     else {
       aCircBuilder.addTangentCurve(aTangentCurve);
-      AttributePoint2DPtr aPassedPoint =
+      AttributePoint2DPtr aPassedPointAttr =
           std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aPassedAttr);
-      if (aPassedPoint)
-        aCircBuilder.setClosestPoint(aPassedPoint->pnt());
+      if (aPassedPointAttr)
+        aCircBuilder.setClosestPoint(aPassedPointAttr->pnt());
     }
   }
 
index fcadd791bfacf5a3517853f41fff9bdb9f792633..35ae7220de41523dad3e43c0d169dab893acf621 100644 (file)
@@ -94,7 +94,7 @@ void SketchPlugin_MacroEllipticArc::execute()
   Events_Loop::loop()->send(aMessage);
 }
 
-void SketchPlugin_MacroEllipticArc::attributeChanged(const std::string& theID)
+void SketchPlugin_MacroEllipticArc::attributeChanged(const std::string& /*theID*/)
 {
   static const int NB_POINTS = 4;
   std::string aPointAttrName[NB_POINTS] = { CENTER_ID(),
index 28b9c5c51d43295f055ef7236b175551411eee8d..48a2900280c7d5ebacb69b9f1f613ca21ed5f888 100644 (file)
@@ -152,6 +152,7 @@ void SketchPlugin_MultiRotation::execute()
       anInitIter++;
   }
   ModelAPI_Tools::removeFeaturesAndReferences(aFeaturesToBeRemoved);
+  aFeaturesToBeRemoved.clear();
   // change number of copies
   if (aCurrentNbCopies != 0 && aNbCopies != aCurrentNbCopies) {
     bool isAdd = aNbCopies > aCurrentNbCopies;
@@ -162,7 +163,6 @@ void SketchPlugin_MultiRotation::execute()
     aTargetList = aRefListOfRotated->list();
     aTargetIter = aTargetList.begin();
     ObjectPtr anObjToCopy = *aTargetIter;
-    std::set<FeaturePtr> aFeaturesToBeRemoved;
     while (aTargetIter != aTargetList.end()) {
       aRefListOfRotated->remove(*aTargetIter);
       aTargetIter++;
@@ -195,6 +195,7 @@ void SketchPlugin_MultiRotation::execute()
       }
     }
     ModelAPI_Tools::removeFeaturesAndReferences(aFeaturesToBeRemoved);
+    aFeaturesToBeRemoved.clear();
 
     for (aTargetIter = aTargetList.begin(); aTargetIter != aTargetList.end(); aTargetIter++)
       aRefListOfRotated->append(*aTargetIter);
index 3e343f249ca79e6ad2cdb2558ecf9f2223e2e184..e0e6222bccc7da99c49019f70065687d0a3053c3 100644 (file)
@@ -496,7 +496,7 @@ bool SketchPlugin_Projection::fillEllipticArc(FeaturePtr& theProjection,
 
 bool SketchPlugin_Projection::fillBSpline(FeaturePtr& theProjection,
                                           const GeomCurvePtr& theCurve,
-                                          const GeomPlanePtr& thePlane)
+                                          const GeomPlanePtr& /*thePlane*/)
 {
   GeomAPI_BSpline aBSpline(theCurve);
 
@@ -526,9 +526,9 @@ bool SketchPlugin_Projection::fillBSpline(FeaturePtr& theProjection,
   }
   else { // non-rational B-spline
     aWeightsAttr->setSize((int)aWeights.size());
-    std::list<double>::iterator anIt = aWeights.begin();
-    for (int anIndex = 0; anIt != aWeights.end(); ++anIt, ++anIndex)
-      aWeightsAttr->setValue(anIndex, *anIt);
+    std::list<double>::iterator aWIt = aWeights.begin();
+    for (int anIndex = 0; aWIt != aWeights.end(); ++aWIt, ++anIndex)
+      aWeightsAttr->setValue(anIndex, *aWIt);
   }
 
   AttributeDoubleArrayPtr aKnotsAttr =
index 24ce8f58287c52ea56e03af49f871db1a283165e..4439c1067e27b8344d4086958959d81ec1beaa1a 100644 (file)
@@ -185,8 +185,7 @@ static void copyRefList(AttributeRefListPtr theOld,
 }
 
 static void copySelection(AttributeSelectionPtr theOld,
-                          AttributeSelectionPtr theNew,
-                          MapEntities& theMapOldNew)
+                          AttributeSelectionPtr theNew)
 {
   theNew->selectValue(theOld);
 }
@@ -215,8 +214,7 @@ void copyAttribute(AttributePtr theOld, AttributePtr theNew, MapEntities& theMap
   }
   else if (theNew->attributeType() == ModelAPI_AttributeSelection::typeId()) {
     copySelection(std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theOld),
-                  std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theNew),
-                  theMapOldNew);
+                  std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theNew));
   }
 }
 
index a8266e6302905e6789c45cd09f0fd9a3c5a4040e..e4bb31406be75152b76716682e832f28cdf9224d 100644 (file)
@@ -1095,10 +1095,10 @@ FeaturePtr SketchPlugin_Split::splitEllipticArc(FeaturePtr& theSplitFeature,
 }
 
 FeaturePtr SketchPlugin_Split::splitClosed(FeaturePtr& theSplitFeature,
-                                               FeaturePtr& theBaseFeatureModified,
-                                               FeaturePtr& theAfterFeature,
-                                               std::set<AttributePoint2DPtr>& thePoints,
-                                               std::set<FeaturePtr>& theCreatedFeatures,
+                                           FeaturePtr& theBaseFeatureModified,
+                                           FeaturePtr& /*theAfterFeature*/,
+                                           std::set<AttributePoint2DPtr>& thePoints,
+                                           std::set<FeaturePtr>& theCreatedFeatures,
                  std::set<std::pair<AttributePtr, AttributePtr>>& theModifiedAttributes)
 {
   FeaturePtr anNewFeature;
@@ -1212,7 +1212,7 @@ FeaturePtr SketchPlugin_Split::splitClosed(FeaturePtr& theSplitFeature,
 
 void SketchPlugin_Split::arrangePointsOnLine(
     const AttributePoint2DPtr& theStartPointAttr,
-    const AttributePoint2DPtr& theEndPointAttr,
+    const AttributePoint2DPtr& /*theEndPointAttr*/,
     AttributePoint2DPtr& theFirstPointAttr,
     AttributePoint2DPtr& theLastPointAttr) const
 {
@@ -1228,7 +1228,7 @@ void SketchPlugin_Split::arrangePointsOnLine(
 void SketchPlugin_Split::arrangePointsOnArc(
     const FeaturePtr& theArc,
     const std::shared_ptr<GeomDataAPI_Point2D>& theStartPointAttr,
-    const std::shared_ptr<GeomDataAPI_Point2D>& theEndPointAttr,
+    const std::shared_ptr<GeomDataAPI_Point2D>& /*theEndPointAttr*/,
     std::shared_ptr<GeomDataAPI_Point2D>& theFirstPointAttr,
     std::shared_ptr<GeomDataAPI_Point2D>& theSecondPointAttr) const
 {
index e5d14832367743212d904f1c15ecf5e6db4bb2f2..bbdefcbdd0543a371bdb6e15956bf35b5268edbe 100644 (file)
@@ -149,8 +149,8 @@ void findCoincidences(const FeaturePtr theStartCoin,
     std::set<FeaturePtr>::const_iterator aCIt = aCoincidences.begin();
     for (; aCIt != aCoincidences.end(); ++aCIt) {
       FeaturePtr aConstrFeature = *aCIt;
-      std::shared_ptr<GeomAPI_Pnt2d> aPnt = getCoincidencePoint(aConstrFeature);
-      if(aPnt.get() && aOrig->isEqual(aPnt)) {
+      std::shared_ptr<GeomAPI_Pnt2d> aPnt2d = getCoincidencePoint(aConstrFeature);
+      if(aPnt2d.get() && aOrig->isEqual(aPnt2d)) {
         findCoincidences(aConstrFeature, SketchPlugin_ConstraintCoincidence::ENTITY_A(),
                          theList, theIsAttrOnly);
         findCoincidences(aConstrFeature, SketchPlugin_ConstraintCoincidence::ENTITY_B(),
@@ -761,9 +761,9 @@ void SketchPlugin_SegmentationTools::fillObjectShapes(
       // collect all intersection points with other edges for Trim operation only
       std::list<FeaturePtr> aFeatures;
       for (int i = 0; i < aSketch->numberOfSubs(); i++) {
-        FeaturePtr aFeature = aSketch->subFeature(i);
-        if (aFeature.get() && aFeature->getKind() != SketchPlugin_Projection::ID())
-          aFeatures.push_back(aFeature);
+        FeaturePtr aSubFeature = aSketch->subFeature(i);
+        if (aSubFeature.get() && aSubFeature->getKind() != SketchPlugin_Projection::ID())
+          aFeatures.push_back(aSubFeature);
       }
       ModelGeomAlgo_Point2D::getPointsIntersectedShape(aFeature, aFeatures, aPoints);
     }
index 53ca4deb1de651b370366bff5acd2e00965f6110..e530af81d05908df4906756ce0343cf2bee5ad6c 100644 (file)
@@ -354,27 +354,27 @@ void SketchPlugin_Trim::execute()
                 << "]" << std::endl;
 #endif
 
-    std::shared_ptr<GeomAPI_Pnt> aPoint;
+    std::shared_ptr<GeomAPI_Pnt> aExtrPoint;
     if (aStartShapePoint2d.get() && aPoint2d->isEqual(aStartShapePoint2d))
-      aPoint = aStartShapePoint;
+      aExtrPoint = aStartShapePoint;
     else if (aLastShapePoint2d.get() && aPoint2d->isEqual(aLastShapePoint2d))
-      aPoint = aLastShapePoint;
+      aExtrPoint = aLastShapePoint;
 
-    if (!aPoint.get())
+    if (!aExtrPoint.get())
       continue;
 
     std::pair<std::list<AttributePoint2DPtr >, std::list<ObjectPtr > > anInfo;
     for (GeomAlgoAPI_ShapeTools::PointToRefsMap::const_iterator aRefIt = aRefsMap.begin();
          aRefIt != aRefsMap.end(); aRefIt++)
     {
-      if (aRefIt->first->isEqual(aPoint)) {
+      if (aRefIt->first->isEqual(aExtrPoint)) {
         anInfo = aRefIt->second;
         // prefer a segment instead of a point, because further coincidence with a segment
         // decreases only 1 DoF (instead of 2 for point) and prevents an overconstraint situation.
         bool isEdge = false;
-        for (std::list<ObjectPtr>::const_iterator anIt = anInfo.second.begin();
-             anIt != anInfo.second.end() && !isEdge; ++anIt) {
-          ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(*anIt);
+        for (std::list<ObjectPtr>::const_iterator anInfoIt = anInfo.second.begin();
+             anInfoIt != anInfo.second.end() && !isEdge; ++anInfoIt) {
+          ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(*anInfoIt);
           if (aResult) {
             GeomShapePtr aShape = aResult->shape();
             isEdge = aShape && aShape->isEdge();
@@ -1086,7 +1086,7 @@ FeaturePtr SketchPlugin_Trim::trimClosed(const std::shared_ptr<GeomAPI_Pnt2d>& t
 }
 
 void SketchPlugin_Trim::arrangePointsOnLine(const AttributePoint2DPtr& theStartPointAttr,
-                                            const AttributePoint2DPtr& theEndPointAttr,
+                                            const AttributePoint2DPtr& /*theEndPointAttr*/,
                                             std::shared_ptr<GeomAPI_Pnt2d>& theFirstPoint,
                                             std::shared_ptr<GeomAPI_Pnt2d>& theLastPoint) const
 {
@@ -1104,7 +1104,7 @@ void SketchPlugin_Trim::arrangePointsOnLine(const AttributePoint2DPtr& theStartP
 
 void SketchPlugin_Trim::arrangePointsOnArc(const FeaturePtr& theArc,
                                   const AttributePoint2DPtr& theStartPointAttr,
-                                  const AttributePoint2DPtr& theEndPointAttr,
+                                  const AttributePoint2DPtr& /*theEndPointAttr*/,
                                   std::shared_ptr<GeomAPI_Pnt2d>& theFirstPoint,
                                   std::shared_ptr<GeomAPI_Pnt2d>& theSecondPoint) const
 {
index 0597d95a09e726865f7986c6a406b3820883444d..078c87f76371d66131fd28700ba381a17a6f2daa 100644 (file)
 #include <algorithm>
 #include <cmath>
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4100)
+#endif
+
 const double tolerance = 1.e-7;
 
 static bool isSpline(FeaturePtr theFeature)
index 43bac7a5613923312f06f72679f511912d3824c3..85ed2423f889251c5a6c74e278a107368acf711b 100644 (file)
@@ -111,9 +111,9 @@ bool hasEdge(ModelAPI_Feature* theConstraint)
 
 
 void SketcherPrs_Coincident::Compute(
-  const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+  const Handle(PrsMgr_PresentationManager3d)& /*thePresentationManager*/,
   const Handle(Prs3d_Presentation)& thePresentation,
-  const Standard_Integer theMode)
+  const Standard_Integer /*theMode*/)
 {
   gp_Pnt aPoint;
   bool aReadyToDisplay = readyToDisplay(myConstraint, mySketch->coordinatePlane(), aPoint);
@@ -181,8 +181,8 @@ void SketcherPrs_Coincident::Compute(
 }
 
 
-void SketcherPrs_Coincident::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
-                                            const Standard_Integer aMode)
+void SketcherPrs_Coincident::ComputeSelection(const Handle(SelectMgr_Selection)& /*theSelection*/,
+                                              const Standard_Integer /*theMode*/)
 {
   // There is no selection of coincident - a point is selected instead of coincidence
 }
index c5c949ffdf484e2466051ea8eae14b683706e64d..98e82a2cc5d6ee16e047e6de5eaff65e2f79c212 100644 (file)
@@ -487,10 +487,10 @@ void SketcherPrs_PositionMgr::deleteConstraint(const SketcherPrs_SymbolPrs* theP
         aToDel.push_back(aIt->first);
       else {
         // Reindex objects positions in order to avoid spaces
-        PositionsMap::iterator aIt;
+        PositionsMap::iterator aPMIt;
         int i = 0;
-        for (aIt = aPosMap.begin(); aIt != aPosMap.end(); aIt++, i++)
-          aIt->second = i;
+        for (aPMIt = aPosMap.begin(); aPMIt != aPosMap.end(); aPMIt++, i++)
+          aPMIt->second = i;
       }
     }
   }
index 96eaade662fa5fa7304f258cdcd6cb50f8807b1d..9bd5a88defd81b0ef14b098c58f64453b8f5367c 100644 (file)
@@ -240,7 +240,7 @@ void SketcherPrs_SymbolPrs::addLine(const Handle(Graphic3d_Group)& theGroup,
 
 //*********************************************************************************
 void SketcherPrs_SymbolPrs::HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM,
-                                            const SelectMgr_SequenceOfOwner& theOwners)
+                                            const SelectMgr_SequenceOfOwner& /*theOwners*/)
 {
   Handle( Prs3d_Presentation ) aSelectionPrs = GetSelectPresentation( thePM );
   aSelectionPrs->Clear();
@@ -255,7 +255,7 @@ void SketcherPrs_SymbolPrs::HilightSelected(const Handle(PrsMgr_PresentationMana
 void SketcherPrs_SymbolPrs::HilightOwnerWithColor(
                                   const Handle(PrsMgr_PresentationManager3d)& thePM,
                                   const Handle(Prs3d_Drawer)& theStyle,
-                                  const Handle(SelectMgr_EntityOwner)& theOwner)
+                                  const Handle(SelectMgr_EntityOwner)& /*theOwner*/)
 {
   thePM->Color(this, theStyle);
 
@@ -270,9 +270,9 @@ void SketcherPrs_SymbolPrs::HilightOwnerWithColor(
 
 //*********************************************************************************
 void SketcherPrs_SymbolPrs::Compute(
-                const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+                const Handle(PrsMgr_PresentationManager3d)& /*thePresentationManager*/,
                 const Handle(Prs3d_Presentation)& thePresentation,
-                const Standard_Integer theMode)
+                const Standard_Integer /*theMode*/)
 {
   if (!plane().get())
     return;
index 9c475af3e2444b7279df1bea1ae24f2ce22fd5e0..dfc7ac4be06b3a961c591ee4092ecf9aea3a1e49 100644 (file)
@@ -126,11 +126,12 @@ protected:
   /// Redefine this function in order to add additiona lines of constraint base
   /// \param thePrs a presentation
   /// \param theColor a color of additiona lines
-  virtual void drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const {}
+  virtual void drawLines(const Handle(Prs3d_Presentation)& /*thePrs*/,
+                         Quantity_Color /*theColor*/) const {}
 
   /// Update myPntArray according to presentation positions
   /// \return true in case of success
-  virtual bool updateIfReadyToDisplay(double theStep, bool withColor) const { return true; }
+  virtual bool updateIfReadyToDisplay(double /*theStep*/, bool /*withColor*/) const { return true; }
 
   /// Draw a shape into the given presentation scene
   /// \param theShape the shape to draw
index cf06cc22637e0dd014480f772aa9560c09eb5524..cddabd7c3c9b58f70328058ab70a458fa99608ff 100644 (file)
@@ -298,7 +298,7 @@ namespace {
     }
   }
 
-  void exportStep(Step* step, Field* field, xmlNodePtr nodeSteps)
+  void exportStep(Step* step, Field* /*field*/, xmlNodePtr nodeSteps)
   {
     xmlNodePtr nodeStep = xmlNewChild(nodeSteps, 0, C_TAG_STEP, 0);
     xmlNewProp(nodeStep, C_ATTR_STEP_NUMBER, BAD_CAST XaoUtils::intToString(step->getStep()).c_str());
@@ -378,7 +378,7 @@ namespace {
     xaoObject->setGeometry(geometry);
   }
 
-  void parseShapeNode(xmlDocPtr doc, xmlNodePtr shapeNode, Geometry* geometry)
+  void parseShapeNode(xmlDocPtr /*doc*/, xmlNodePtr shapeNode, Geometry* geometry)
   {
     if (geometry->getFormat() == XAO::BREP)
     {
index a1a63856b9145630d2ea348ba2eec2364eed96be..ef9ac7c00b68cc9a3990163d5ebc916582d1456f 100644 (file)
@@ -390,7 +390,9 @@ void XGUI_ActionsMgr::updateByDocumentKind()
 {
   std::string aStdDocKind = ModelAPI_Session::get()->activeDocument()->kind();
   QString aDocKind = QString::fromStdString(aStdDocKind);
+#ifdef HAVE_SALOME
   XGUI_Workshop* aWorkshop = static_cast<XGUI_Workshop*>(parent());
+#endif
   foreach(QAction* eachAction, myActions.values()) {
     QString aCmdDocKind;
 #ifdef HAVE_SALOME
index 2972b77c5f9f00827d77d80e5144365cdf37d1a5..8feca1f340912900ded52ea8c5db2c87e55a3059 100644 (file)
@@ -396,7 +396,6 @@ void XGUI_ContextMenuMgr::updateObjectBrowserMenu()
           // Check is selection continuous
           XGUI_DataModel* aModel = myWorkshop->objectBrowser()->dataModel();
           DocumentPtr aDoc = aMgr->activeDocument();
-          std::list<FeaturePtr> aFeatures = aSelMgr->getSelectedFeatures();
 
           bool isContinuos = true;
           if (aSelected > 1) {
index 8b7ff8c7efb13f776408994197b676eab967e99b..e3a1fb6329fa7cfba576d745e4f3be364f562103 100644 (file)
 
 #include <cassert>
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4100)
+#endif
+
 
 
 // Constructor *************************************************
index e29ed81222fe651ac132be23f1193f157d9b37a2..e9d1f320d96d171a4960a69f44e6d7c99441d151 100644 (file)
 
 #include <set>
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4702)
+#endif
+
 /// defines the local context mouse selection sensitivity
 const int MOUSE_SENSITIVITY_IN_PIXEL = 10;
 
@@ -1038,9 +1042,9 @@ void XGUI_Displayer::getPresentations(const ObjectPtr& theObject,
     ModelAPI_Tools::allResults(aFeature, aResults);
     std::list<ResultPtr>::const_iterator anIt = aResults.begin(), aLast = aResults.end();
     for (; anIt != aLast; ++anIt) {
-      AISObjectPtr aAISObj = getAISObject(*anIt);
-      if (aAISObj.get() != NULL) {
-        Handle(AIS_InteractiveObject) anAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
+      AISObjectPtr aCurAISObj = getAISObject(*anIt);
+      if (aCurAISObj.get() != NULL) {
+        Handle(AIS_InteractiveObject) anAIS = aCurAISObj->impl<Handle(AIS_InteractiveObject)>();
         if (!anAIS.IsNull() && !thePresentations.Contains(anAIS))
           thePresentations.Add(anAIS);
       }
index df5c2ddd796d062b33f4722fea73f2a1c6ebf59b..89528ce7c875d76ea297cb4303e57dab926011da 100644 (file)
@@ -397,14 +397,14 @@ void XGUI_FacesPanel::processSelection()
     // It can happen in case of groups selection
     QMap<int, ModuleBase_ViewerPrsPtr>::const_iterator aIt;
     for (aIt = myItems.cbegin(); aIt != myItems.cend(); aIt++) {
-      ModuleBase_ViewerPrsPtr aPrs = aIt.value();
-      ObjectPtr aObject = aPrs->object();
-      ResultGroupPtr aResGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(aObject);
-      if (aResGroup.get())
+      ModuleBase_ViewerPrsPtr aCurPrs = aIt.value();
+      ObjectPtr aObject = aCurPrs->object();
+      ResultGroupPtr aCurResGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(aObject);
+      if (aCurResGroup.get())
         continue;
       if (anObjectToShapes.find(aObject) != anObjectToShapes.end()) {
         TopoDS_ListOfShape aShapes = anObjectToShapes[aObject];
-        GeomShapePtr aShapePtr = aPrs->shape();
+        GeomShapePtr aShapePtr = aCurPrs->shape();
         if (aShapes.Contains(aShapePtr->impl<TopoDS_Shape>())) {
           aToRemove.insert(aIt.key());
         }
@@ -647,14 +647,14 @@ void XGUI_FacesPanel::onObjectDisplay(ObjectPtr theObject, AISObjectPtr theAIS)
           // corresponded faces have been restored
           for (aSIt = aObjectToShapes.begin(); aSIt != aObjectToShapes.end(); aSIt++) {
             TopoDS_ListOfShape aShapes = aSIt->second;
-            Handle(ModuleBase_ResultPrs) aPrs = aObjectToPrs[aSIt->first];
-            TopoDS_ListOfShape aAlreadyHidden = aPrs->hiddenSubShapes();
+            Handle(ModuleBase_ResultPrs) aResPrs = aObjectToPrs[aSIt->first];
+            TopoDS_ListOfShape aAlreadyHidden = aResPrs->hiddenSubShapes();
             TopoDS_ListOfShape::Iterator aShPIt(aShapes);
             for (; aShPIt.More(); aShPIt.Next()) {
               if (aAlreadyHidden.Contains(aShPIt.Value()))
                 aAlreadyHidden.Remove(aShPIt.Value());
             }
-            aPrs->setSubShapeHidden(aAlreadyHidden);
+            aResPrs->setSubShapeHidden(aAlreadyHidden);
             aObjects.insert(aSIt->first);
           }
           aIdsToRem.insert(aIt.key());
@@ -665,7 +665,6 @@ void XGUI_FacesPanel::onObjectDisplay(ObjectPtr theObject, AISObjectPtr theAIS)
           if (aPIt != aObjectToPrs.end()) {
             ObjectPtr aObj = aPIt->first;
             if (aObj == theObject) {
-              Handle(ModuleBase_ResultPrs) aPrs = aPIt->second;
               TopoDS_ListOfShape aShapes = aObjectToShapes[aObj];
               aHideShapes.Append(aShapes);
               aObjects.insert(aObj);
index 86b46cf8bbd90ea437af0e93b5a0455bd329c4dc..09f572a6243f1e3e1ece680d6a0bd8c9b9b3ae2f 100644 (file)
@@ -618,8 +618,8 @@ void XGUI_ObjectsBrowser::clearContent()
 }
 
 //***************************************************
-void XGUI_ObjectsBrowser::onSelectionChanged(const QItemSelection& theSelected,
-                                       const QItemSelection& theDeselected)
+void XGUI_ObjectsBrowser::onSelectionChanged(const QItemSelection& /*theSelected*/,
+                                             const QItemSelection& /*theDeselected*/)
 {
   onSelectionChanged();
 }
index 139fe20b21be98840487c0b9681b6e453491f908..3bca93a90f19e6fc9bd569c22014a91fecc42054 100644 (file)
@@ -466,9 +466,9 @@ void XGUI_OperationMgr::abortOperation(ModuleBase_Operation* theOperation)
     // all operation from the current to triggered should also be aborted
     // operations over the parameter one are not aborted(e.g. extrusion cut, sketch abort)
     while(hasOperation()) {
-      ModuleBase_Operation* aCurrentOperation = currentOperation();
-      aCurrentOperation->abort();
-      if(theOperation == aCurrentOperation)
+      ModuleBase_Operation* aCurOperation = currentOperation();
+      aCurOperation->abort();
+      if(theOperation == aCurOperation)
         break;
     }
   }
index 565f9d7734374d33be8b6190ae6ec20a466b53ee..e9a137851aa45e763e26f3bf898968ea31e3cc94 100644 (file)
@@ -365,15 +365,15 @@ void findDirectChildren(QWidget* theParent, QList<QWidget*>& theWidgets, const b
           }
         }
         else if (anItem->layout()) {
-          QLayout* aLayout = anItem->layout();
-          for (int i = 0, aCount = aLayout->count(); i < aCount; i++) {
-            QLayoutItem* anItem = aLayout->itemAt(i);
-            QWidget* aWidget = anItem ? anItem->widget() : 0;
-            if (aWidget) {
-              if (aWidget->isVisible()) {
-                if (aWidget->focusPolicy() != Qt::NoFocus)
-                  theWidgets.append(aWidget);
-                findDirectChildren(aWidget, theWidgets, false);
+          QLayout* anItemLayout = anItem->layout();
+          for (int it = 0, cnt = anItemLayout->count(); it < cnt; it++) {
+            QLayoutItem* aCurItem = anItemLayout->itemAt(it);
+            QWidget* aCurWidget = aCurItem ? aCurItem->widget() : 0;
+            if (aCurWidget) {
+              if (aCurWidget->isVisible()) {
+                if (aCurWidget->focusPolicy() != Qt::NoFocus)
+                  theWidgets.append(aCurWidget);
+                findDirectChildren(aCurWidget, theWidgets, false);
               }
             }
             else {
index e38e5c5b5bcaab09c3f9e51ebadb59e74436dd63..b7bd0c733d7a2835741ab61fdc3108e235944d33 100644 (file)
@@ -446,13 +446,12 @@ void XGUI_Selection::entityOwners(const Handle(AIS_InteractiveObject)& theObject
 
     Handle(SelectMgr_Selection) aSelection = theObject->Selection(aMode);
     NCollection_Vector<Handle(SelectMgr_SensitiveEntity)> anEntities = aSelection->Entities();
-    for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator anIt(anEntities);
-        anIt.More();
-        anIt.Next()) {
-      Handle(SelectMgr_SensitiveEntity) anEntity = anIt.Value();
+    for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator anEntIt(anEntities);
+         anEntIt.More(); anEntIt.Next()) {
+      Handle(SelectMgr_SensitiveEntity) anEntity = anEntIt.Value();
       if (anEntity.IsNull())
         continue;
-       Handle(SelectMgr_EntityOwner) anOwner = anEntity->BaseSensitive()->OwnerId();
+      Handle(SelectMgr_EntityOwner) anOwner = anEntity->BaseSensitive()->OwnerId();
       if (!anOwner.IsNull())
         theOwners.Add(anOwner);
     }
index d10d87c0fa6f1613f84d77e32b8a916ffb7c988d..f4e0f36eb129364049f8bafe038a6c42888365dc 100644 (file)
@@ -249,9 +249,9 @@ void XGUI_SelectionMgr::convertToObjectBrowserSelection(
               aFeature = anActiveDocument->producedByFeature(aResult, aShape);
               if (aFeature.get()) {
                 QList<TopoDS_Shape> aResList = findAllShapes(aResult);
-                foreach(TopoDS_Shape aShape, aResList) {
-                  if (!aShapeMap.Contains(aShape))
-                    aShapeMap.Add(aShape);
+                foreach(TopoDS_Shape aResShape, aResList) {
+                  if (!aShapeMap.Contains(aResShape))
+                    aShapeMap.Add(aResShape);
                 }
               }
             }
index a69954fac92f8687a79aabee00de4157c6d0d5e8..c579e2cee277bf202c2f9eb6a869f29c1c94235e 100644 (file)
@@ -26,7 +26,8 @@
 #include <QLabel>
 #include <QSlider>
 
-XGUI_TransparencyWidget::XGUI_TransparencyWidget(QWidget* theParent, const QString& theLabelText)
+XGUI_TransparencyWidget::XGUI_TransparencyWidget(QWidget* theParent,
+                                                 const QString& /*theLabelText*/)
   : QWidget(theParent)
 {
   QVBoxLayout* aLay = new QVBoxLayout(this);
index 94cc72a80e26a62e76a09216a0bfd9088568e5b9..415cd1635b75b920fe89b10abf10b8f44404b67c 100644 (file)
@@ -1037,8 +1037,6 @@ void XGUI_Workshop::openFile(const QString& theDirectory)
 #ifdef _DEBUG
   bool aNewPart = Config_PropManager::boolean("Plugins", "create_part_by_start");
   if (aNewPart) {
-
-    DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument();
     int aSize = aRootDoc->size(ModelAPI_ResultPart::group());
     if (aSize > 0 ) {
       ObjectPtr aObject = aRootDoc->object(ModelAPI_ResultPart::group(), 0);
@@ -2255,8 +2253,8 @@ std::list<FeaturePtr> allFeatures(const DocumentPtr& theDocument)
           std::dynamic_pointer_cast<ModelAPI_ResultPart>(aResult);
       if (aResultPart.get() && aResultPart->partDoc().get()) {
         // Recursion
-        std::list<FeaturePtr> anAllFeatures = allFeatures(aResultPart->partDoc());
-        aResultList.insert(aResultList.end(), anAllFeatures.begin(), anAllFeatures.end());
+        std::list<FeaturePtr> aPartFeatures = allFeatures(aResultPart->partDoc());
+        aResultList.insert(aResultList.end(), aPartFeatures.begin(), aPartFeatures.end());
       }
     }
 
@@ -3210,9 +3208,9 @@ void XGUI_Workshop::changeIsoLines(const QObjectPtrList& theObjects)
   std::vector<int> aValues;
   bool isVisible;
   if (aResultList.size() == 1) {
-    ResultPtr aRes = aResultList.first();
-    if (aRes.get())
-      ModelAPI_Tools::getIsoLines(aRes, isVisible, aValues);
+    ResultPtr aResult = aResultList.first();
+    if (aResult.get())
+      ModelAPI_Tools::getIsoLines(aResult, isVisible, aValues);
     else
       return;
   }
@@ -3247,8 +3245,8 @@ void XGUI_Workshop::changeIsoLines(const QObjectPtrList& theObjects)
 
     aValues[0] = aUNb->value();
     aValues[1] = aVNb->value();
-    foreach(ResultPtr aRes, aResultList) {
-      ModelAPI_Tools::setIsoLines(aRes, aValues);
+    foreach(ResultPtr aResult, aResultList) {
+      ModelAPI_Tools::setIsoLines(aResult, aValues);
     }
     mySelector->clearSelection();
     Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));