diff options
author | Marius Kintel <marius@kintel.net> | 2011-08-04 02:58:17 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-08-04 02:58:17 (GMT) |
commit | cf4821c589dc5a43895c7ea781f6a916c8b5821c (patch) | |
tree | 5d3cf7a69f39187d2cc9b639cacfb68a812ae467 /src/node.cc | |
parent | e3e31c0f4f1049cb983906cc8fea83ef78611231 (diff) |
De-Qt-ified AbstractNode
Diffstat (limited to 'src/node.cc')
-rw-r--r-- | src/node.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/node.cc b/src/node.cc index 3bc8d7b..e2f3fa0 100644 --- a/src/node.cc +++ b/src/node.cc @@ -32,9 +32,10 @@ #include "polyset.h" #include "visitor.h" #include "nodedumper.h" +#include "stl-utils.h" -#include <QRegExp> #include <sstream> +#include <algorithm> size_t AbstractNode::idx_counter; @@ -46,8 +47,7 @@ AbstractNode::AbstractNode(const ModuleInstantiation *mi) AbstractNode::~AbstractNode() { - foreach (AbstractNode *v, children) - delete v; + std::for_each(this->children.begin(), this->children.end(), del_fun<AbstractNode>()); } Response AbstractNode::accept(class State &state, Visitor &visitor) const @@ -87,8 +87,7 @@ std::string AbstractIntersectionNode::name() const void AbstractNode::progress_prepare() { - foreach (AbstractNode *v, children) - v->progress_prepare(); + std::for_each(this->children.begin(), this->children.end(), std::mem_fun(&AbstractNode::progress_prepare)); this->progress_mark = ++progress_report_count; } |