From: azv Date: Tue, 15 Dec 2015 07:58:24 +0000 (+0300) Subject: Fix compilation error on Linux. Part V. X-Git-Tag: V_2.1.0~184 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e3483e0c2eaddb88f2e55a72bd81ca0fb67cc4ce;p=modules%2Fshaper.git Fix compilation error on Linux. Part V. --- diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index 49402a50b..f4ba30c83 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -124,8 +124,7 @@ bool SketchSolver_Group::isBaseWorkplane(CompositeFeaturePtr theWorkplane) const // Class: SketchSolver_Group // Purpose: verify are there any entities in the group used by given constraint // ============================================================================ -bool SketchSolver_Group::isInteract( - std::shared_ptr theFeature) const +bool SketchSolver_Group::isInteract(FeaturePtr theFeature) const { // Empty group interacts with everything if (isEmpty()) @@ -301,7 +300,7 @@ void SketchSolver_Group::updateConstraints() myChangedConstraints.clear(); } -bool SketchSolver_Group::updateFeature(std::shared_ptr theFeature) +bool SketchSolver_Group::updateFeature(FeaturePtr theFeature) { if (!checkFeatureValidity(theFeature)) return false; @@ -335,7 +334,7 @@ bool SketchSolver_Group::updateFeature(std::shared_ptr the return isUpdated; } -void SketchSolver_Group::moveFeature(std::shared_ptr theFeature) +void SketchSolver_Group::moveFeature(FeaturePtr theFeature) { BuilderPtr aBuilder = SketchSolver_Manager::instance()->builder(); @@ -390,9 +389,9 @@ bool SketchSolver_Group::updateWorkplane() myStorage = aBuilder->createStorage(getId()); // sketch should be unchanged, set it out of current group - bool isUpdated = myStorage->update(mySketch, GID_OUTOFGROUP); + bool isUpdated = myStorage->update(FeaturePtr(mySketch), GID_OUTOFGROUP); if (isUpdated) { - EntityWrapperPtr anEntity = myStorage->entity(mySketch); + EntityWrapperPtr anEntity = myStorage->entity(FeaturePtr(mySketch)); myWorkplaneID = anEntity->id(); } return isUpdated; @@ -542,7 +541,7 @@ void SketchSolver_Group::splitGroup(std::list& theCuts) std::list anUnusedConstraints; ConstraintConstraintMap::iterator aCIter = myConstraints.begin(); for ( ; aCIter != myConstraints.end(); aCIter++) { - if (aNewStorage->isInteract(aCIter->first)) + if (aNewStorage->isInteract(FeaturePtr(aCIter->first))) aNewStorage->addConstraint(aCIter->first, aDummyVec); else anUnusedConstraints.push_back(aCIter->first); @@ -551,7 +550,7 @@ void SketchSolver_Group::splitGroup(std::list& theCuts) // Check the unused constraints once again, because they may become interacted with new storage since adding constraints std::list::iterator aUnuseIt = anUnusedConstraints.begin(); while (aUnuseIt != anUnusedConstraints.end()) { - if (aNewStorage->isInteract(*aUnuseIt)) { + if (aNewStorage->isInteract(FeaturePtr(*aUnuseIt))) { aNewStorage->addConstraint(*aUnuseIt, aDummyVec); anUnusedConstraints.erase(aUnuseIt); aUnuseIt = anUnusedConstraints.begin(); diff --git a/src/SketchSolver/SketchSolver_Group.h b/src/SketchSolver/SketchSolver_Group.h index 36bd33739..a8c09c2ac 100644 --- a/src/SketchSolver/SketchSolver_Group.h +++ b/src/SketchSolver/SketchSolver_Group.h @@ -75,19 +75,19 @@ class SketchSolver_Group /** \brief Updates the data corresponding the specified feature * \param[in] theFeature the feature to be updated */ - bool updateFeature(std::shared_ptr theFeature); + bool updateFeature(FeaturePtr theFeature); /** \brief Updates the data corresponding the specified feature moved in GUI. * Additional Fixed constraints are created. * \param[in] theFeature the feature to be updated */ - void moveFeature(std::shared_ptr theFeature); + void moveFeature(FeaturePtr theFeature); /** \brief Verifies the feature attributes are used in this group * \param[in] theFeature constraint or any other object for verification of interaction * \return \c true if some of attributes are used in current group */ - bool isInteract(std::shared_ptr theFeature) const; + bool isInteract(FeaturePtr theFeature) const; /** \brief Verifies the specified feature is equal to the base workplane for this group * \param[in] theWorkplane the feature to be compared with base workplane diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp index fac5e3cc3..b74a8db1a 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp @@ -455,7 +455,8 @@ EntityWrapperPtr SolveSpaceSolver_Builder::createSketchEntity( Slvs_Entity aWorkplane = Slvs_MakeWorkplane(SLVS_E_UNKNOWN, (Slvs_hGroup)theGroupID, SLVS_E_UNKNOWN, SLVS_E_UNKNOWN); - aNewEnt = EntityWrapperPtr(new SolveSpaceSolver_EntityWrapper(theSketch, aWorkplane)); + aNewEnt = EntityWrapperPtr( + new SolveSpaceSolver_EntityWrapper(FeaturePtr(theSketch), aWorkplane)); aNewEnt->setSubEntities(aSubs); return aNewEnt; } diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ConstraintType.h b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ConstraintType.h index c9243e665..a38939bd4 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ConstraintType.h +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ConstraintType.h @@ -9,7 +9,6 @@ #include #include -#include namespace ConstraintType { diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ConstraintWrapper.h b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ConstraintWrapper.h index 7045dca3e..dd1bb1c69 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ConstraintWrapper.h +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ConstraintWrapper.h @@ -8,7 +8,7 @@ #define SolveSpaceSolver_ConstraintWrapper_H_ #include -#include +#include /** diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.h b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.h index 14b0bdb84..4f7482361 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.h +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.h @@ -8,7 +8,7 @@ #define SolveSpaceSolver_EntityWrapper_H_ #include -#include +#include /** * Wrapper providing operations with SolveSpace entities. diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ParameterWrapper.h b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ParameterWrapper.h index eb92245a1..35609f543 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ParameterWrapper.h +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ParameterWrapper.h @@ -8,8 +8,7 @@ #define SolveSpaceSolver_ParameterWrapper_H_ #include - -#include +#include /** * Wrapper providing operations with parameters in SolveSpace.