Skip to content
Snippets Groups Projects
Commit f646e90d authored by Maxence Naud's avatar Maxence Naud
Browse files

[Upd] simplify removeView() member function in Node.hpp

parent 080743a9
No related branches found
No related tags found
1 merge request!45[Upd] replace() instead of replaceWith() in GraphView
...@@ -258,9 +258,7 @@ public: ...@@ -258,9 +258,7 @@ public:
} }
inline void removeView(const std::shared_ptr<GraphView> &graphPtr) { inline void removeView(const std::shared_ptr<GraphView> &graphPtr) {
std::set<std::weak_ptr<GraphView>, weakCompare>::const_iterator viewIt = mViews.cbegin(); mViews.erase(graphPtr);
for (; (viewIt != mViews.cend()) && ((*viewIt).lock() != graphPtr) ; ++viewIt) {}
mViews.erase(*viewIt);
} }
/** /**
...@@ -402,7 +400,7 @@ public: ...@@ -402,7 +400,7 @@ public:
/** /**
* @brief Get the set of pointers to connected node at a distance of a delta. * @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. * Return a nullptr is nofing found.
* @param delta Input delta. * @param delta Input delta.
* @return std::shared_ptr<Node> * @return std::shared_ptr<Node>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment