]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix compilation on Linux
authormpv <mpv@opencascade.com>
Thu, 28 Apr 2016 11:18:44 +0000 (14:18 +0300)
committermpv <mpv@opencascade.com>
Thu, 28 Apr 2016 11:18:44 +0000 (14:18 +0300)
src/Model/Model_AttributeSelectionList.cpp
src/Model/Model_AttributeSelectionList.h

index 86581b348b2581502e97fc2faff7d85c6bfffdcb..9fbef11c6911236e985f44ba8a97e08ebae35ddb 100644 (file)
@@ -187,12 +187,12 @@ bool Model_AttributeSelectionList::isInList(const ResultPtr& theContext,
                                             const std::shared_ptr<GeomAPI_Shape>& theSubShape,
                                             const bool theTemporarily)
 {
-  if (myCash.size()) { // the cashing is active
-    std::map<ResultPtr, std::list<const std::shared_ptr<GeomAPI_Shape> > >::iterator aContext =
+  if (!myCash.empty()) { // the cashing is active
+    std::map<ResultPtr, std::list<std::shared_ptr<GeomAPI_Shape> > >::iterator aContext =
       myCash.find(theContext);
     if (aContext != myCash.end()) {
       // iterate shapes because "isEqual" method must be called for each shape
-      std::list<const std::shared_ptr<GeomAPI_Shape> >::iterator aShapes = aContext->second.begin();
+      std::list<std::shared_ptr<GeomAPI_Shape> >::iterator aShapes = aContext->second.begin();
       for(; aShapes != aContext->second.end(); aShapes++) {
         if (!theSubShape.get()) {
           if (!aShapes->get())
index 2df86e31d053de6cd23e9a2233534bd3a6ba34b3..99f2dfdd8a514ccd09a43337d72f5195c3498e5d 100644 (file)
@@ -28,7 +28,7 @@ class Model_AttributeSelectionList : public ModelAPI_AttributeSelectionList
   Handle(TDataStd_Comment) mySelectionType;
   std::shared_ptr<Model_AttributeSelection> myTmpAttr; ///< temporary attribute (the last one)
   /// the cashed shapes to optimize isInList method: from context to set of shapes in this context
-  std::map<ResultPtr, std::list<const std::shared_ptr<GeomAPI_Shape> > > myCash;
+  std::map<ResultPtr, std::list<std::shared_ptr<GeomAPI_Shape> > > myCash;
 public:
   /// Adds the new reference to the end of the list
   /// \param theContext object where the sub-shape was selected