summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/treeserver.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-11-01 18:17:04 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-11-01 18:17:04 +0100
commitfbc73e20784b055485f676096e758d6aeed62e0c (patch)
tree8251c8473af414527becb989558a69c4e7dc49b4 /src/modules/m_spanningtree/treeserver.cpp
parent5fb509060fa7552a25efccad11595898d420d476 (diff)
Add stdalgo::erase() and use it to simplify code
Diffstat (limited to 'src/modules/m_spanningtree/treeserver.cpp')
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 009478635..98d7c8754 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -322,13 +322,7 @@ void TreeServer::AddChild(TreeServer* Child)
bool TreeServer::DelChild(TreeServer* Child)
{
- std::vector<TreeServer*>::iterator it = std::find(Children.begin(), Children.end(), Child);
- if (it != Children.end())
- {
- Children.erase(it);
- return true;
- }
- return false;
+ return stdalgo::erase(Children, Child);
}
CullResult TreeServer::cull()