From: mpv Date: Wed, 25 May 2022 12:52:38 +0000 (+0300) Subject: Fix for compilation problems and warnings. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6301af1cd2ae24a55fceb77a666179b7656ef1d4;p=modules%2Fshaper.git Fix for compilation problems and warnings. --- diff --git a/src/Model/Model_BodyBuilder.cpp b/src/Model/Model_BodyBuilder.cpp index 7e5b79a9d..d68bfa961 100644 --- a/src/Model/Model_BodyBuilder.cpp +++ b/src/Model/Model_BodyBuilder.cpp @@ -529,7 +529,7 @@ void Model_BodyBuilder::generated(const GeomShapePtr& theOldShape, if (aNewShapeType == TopAbs_WIRE || aNewShapeType == TopAbs_SHELL) { // TODO: This is a workaround. New shape should be only vertex, edge or face. TopAbs_ShapeEnum aShapeTypeToExplore = aNewShapeType == TopAbs_WIRE ? TopAbs_EDGE : TopAbs_FACE; - aTag = TopAbs_WIRE ? GENERATED_EDGES_TAG : GENERATED_FACES_TAG; + aTag = aNewShapeType == TopAbs_WIRE ? GENERATED_EDGES_TAG : GENERATED_FACES_TAG; for (TopExp_Explorer anExp(aNewShape, aShapeTypeToExplore); anExp.More(); anExp.Next()) { builder(aTag)->Generated(anOldShape, anExp.Current()); } @@ -750,7 +750,7 @@ void Model_BodyBuilder::loadGeneratedShapes(const GeomMakeShapePtr& theAlgo, // TODO: This is a workaround. New shape should be only edge or face. TopAbs_ShapeEnum aShapeTypeToExplore = aNewShapeType == TopAbs_WIRE ? TopAbs_EDGE : TopAbs_FACE; - int aTag = TopAbs_WIRE ? GENERATED_EDGES_TAG : GENERATED_FACES_TAG; + int aTag = aNewShapeType == TopAbs_WIRE ? GENERATED_EDGES_TAG : GENERATED_FACES_TAG; for (TopExp_Explorer anExp(aNewShape_, aShapeTypeToExplore); anExp.More(); anExp.Next()) { builder(aTag)->Generated(anOldSubShape_, anExp.Current()); // store information about the external document reference to restore old shape on open diff --git a/src/Model/Model_Session.cpp b/src/Model/Model_Session.cpp index 338c45142..9a11c5ae4 100644 --- a/src/Model/Model_Session.cpp +++ b/src/Model/Model_Session.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -675,7 +674,9 @@ void Model_Session::blockAutoUpdate(const bool theBlock) } } +#ifdef TINSPECTOR Handle(TDocStd_Application) Model_Session::application() { return Model_Application::getApplication(); } +#endif \ No newline at end of file diff --git a/src/ModelAPI/ModelAPI_Events.cpp b/src/ModelAPI/ModelAPI_Events.cpp index 5734de4cd..c980a7583 100644 --- a/src/ModelAPI/ModelAPI_Events.cpp +++ b/src/ModelAPI/ModelAPI_Events.cpp @@ -472,7 +472,8 @@ const ListOfShape& ModelAPI_ShapesFailedMessage::shapes() const } /// Creates an empty message -ModelAPI_CheckConstraintsMessage::ModelAPI_CheckConstraintsMessage(const Events_ID theID, const void* theSender) +ModelAPI_CheckConstraintsMessage::ModelAPI_CheckConstraintsMessage( + const Events_ID theID, const void* theSender) :Events_Message(theID, theSender) { } diff --git a/src/ModelAPI/ModelAPI_Events.h b/src/ModelAPI/ModelAPI_Events.h index efab2fae1..55eb838d0 100644 --- a/src/ModelAPI/ModelAPI_Events.h +++ b/src/ModelAPI/ModelAPI_Events.h @@ -668,7 +668,8 @@ class ModelAPI_CheckConstraintsMessage : public Events_Message { public: /// Creates an empty message - MODELAPI_EXPORT ModelAPI_CheckConstraintsMessage(const Events_ID theID, const void* theSender = 0); + MODELAPI_EXPORT ModelAPI_CheckConstraintsMessage( + const Events_ID theID, const void* theSender = 0); /// The virtual destructor MODELAPI_EXPORT virtual ~ModelAPI_CheckConstraintsMessage(); diff --git a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp index 4e2662319..020c3fd6a 100644 --- a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp @@ -73,6 +73,7 @@ #include #include #include +#include // =========== Implementation of storage of dumped data =========== static const int THE_DUMP_PRECISION = 16;