diff options
Diffstat (limited to 'codemaker/source/codemaker/exceptiontree.cxx')
-rw-r--r-- | codemaker/source/codemaker/exceptiontree.cxx | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/codemaker/source/codemaker/exceptiontree.cxx b/codemaker/source/codemaker/exceptiontree.cxx index b6c2aeee6f87..148f017b6877 100644 --- a/codemaker/source/codemaker/exceptiontree.cxx +++ b/codemaker/source/codemaker/exceptiontree.cxx @@ -63,27 +63,28 @@ void ExceptionTree::add( getDirectBase()); assert(!n.isEmpty()); } - if (!bRuntimeException) { - ExceptionTreeNode * node = &m_root; - for (std::vector< OString >::reverse_iterator i(list.rbegin()); - !node->present; ++i) + if (bRuntimeException) + return; + + ExceptionTreeNode * node = &m_root; + for (std::vector< OString >::reverse_iterator i(list.rbegin()); + !node->present; ++i) + { + if (i == list.rend()) { + node->setPresent(); + break; + } + for (ExceptionTreeNode::Children::iterator j( + node->children.begin());; + ++j) { - if (i == list.rend()) { - node->setPresent(); + if (j == node->children.end()) { + node = node->add(*i); break; } - for (ExceptionTreeNode::Children::iterator j( - node->children.begin());; - ++j) - { - if (j == node->children.end()) { - node = node->add(*i); - break; - } - if ((*j)->name == *i) { - node = j->get(); - break; - } + if ((*j)->name == *i) { + node = j->get(); + break; } } } |