diff --git a/include/aidge/graph/Node.hpp b/include/aidge/graph/Node.hpp index 1d8449ac25cf8c31192da0c350c14cbfa50a48f4..f1d0a39d4bd7dba6990a46d61f7456c03244e44e 100644 --- a/include/aidge/graph/Node.hpp +++ b/include/aidge/graph/Node.hpp @@ -258,9 +258,7 @@ public: } inline void removeView(const std::shared_ptr<GraphView> &graphPtr) { - std::set<std::weak_ptr<GraphView>, weakCompare>::const_iterator viewIt = mViews.cbegin(); - for (; (viewIt != mViews.cend()) && ((*viewIt).lock() != graphPtr) ; ++viewIt) {} - mViews.erase(*viewIt); + mViews.erase(graphPtr); } /** @@ -402,7 +400,7 @@ public: /** * @brief Get the set of pointers to connected node at a distance of a delta. - * @details the recution are cut + * @details the recution are cut * Return a nullptr is nofing found. * @param delta Input delta. * @return std::shared_ptr<Node>