From: mpv Date: Thu, 28 Apr 2016 11:18:44 +0000 (+0300) Subject: Fix compilation on Linux X-Git-Tag: V_2.3.0~81 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=622ac935fd1d8a5bc282ee127666a3e9d1954713;p=modules%2Fshaper.git Fix compilation on Linux --- diff --git a/src/Model/Model_AttributeSelectionList.cpp b/src/Model/Model_AttributeSelectionList.cpp index 86581b348..9fbef11c6 100644 --- a/src/Model/Model_AttributeSelectionList.cpp +++ b/src/Model/Model_AttributeSelectionList.cpp @@ -187,12 +187,12 @@ bool Model_AttributeSelectionList::isInList(const ResultPtr& theContext, const std::shared_ptr& theSubShape, const bool theTemporarily) { - if (myCash.size()) { // the cashing is active - std::map > >::iterator aContext = + if (!myCash.empty()) { // the cashing is active + std::map > >::iterator aContext = myCash.find(theContext); if (aContext != myCash.end()) { // iterate shapes because "isEqual" method must be called for each shape - std::list >::iterator aShapes = aContext->second.begin(); + std::list >::iterator aShapes = aContext->second.begin(); for(; aShapes != aContext->second.end(); aShapes++) { if (!theSubShape.get()) { if (!aShapes->get()) diff --git a/src/Model/Model_AttributeSelectionList.h b/src/Model/Model_AttributeSelectionList.h index 2df86e31d..99f2dfdd8 100644 --- a/src/Model/Model_AttributeSelectionList.h +++ b/src/Model/Model_AttributeSelectionList.h @@ -28,7 +28,7 @@ class Model_AttributeSelectionList : public ModelAPI_AttributeSelectionList Handle(TDataStd_Comment) mySelectionType; std::shared_ptr myTmpAttr; ///< temporary attribute (the last one) /// the cashed shapes to optimize isInList method: from context to set of shapes in this context - std::map > > myCash; + std::map > > myCash; public: /// Adds the new reference to the end of the list /// \param theContext object where the sub-shape was selected