summaryrefslogtreecommitdiff
path: root/hwpfilter/source/formula.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'hwpfilter/source/formula.cxx')
-rw-r--r--hwpfilter/source/formula.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx
index c3d3b9ce4f2b..5ab06f91dd9b 100644
--- a/hwpfilter/source/formula.cxx
+++ b/hwpfilter/source/formula.cxx
@@ -613,12 +613,9 @@ void Formula::parse()
if( res ){
makeMathML( res );
}
- int count = nodelist.size();
- for( i = 0 ; i < count ; i++ ){
- const Node *tmpNode = nodelist.front();
- nodelist.pop_front();
- delete tmpNode;
- }
+ for (const auto &node : nodelist)
+ delete node;
+ nodelist.clear();
}
void Formula::trim()