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())
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