/src/libreoffice/starmath/source/mathml/iterator.cxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
5 | | * This Source Code Form is subject to the terms of the Mozilla Public |
6 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
7 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
8 | | */ |
9 | | |
10 | | #include <mathml/iterator.hxx> |
11 | | |
12 | | /** The purpose of this iterator is to be able to iterate threw an infinite element tree |
13 | | * infinite -> as much as your memory can hold |
14 | | * No call-backs that will end up in out of stack |
15 | | */ |
16 | | |
17 | | namespace mathml |
18 | | { |
19 | | void SmMlIteratorFree(SmMlElement* pMlElementTree) |
20 | 783 | { |
21 | 783 | if (pMlElementTree == nullptr) |
22 | 783 | return; |
23 | 0 | for (size_t i = 0; i < pMlElementTree->getSubElementsCount(); ++i) |
24 | 0 | { |
25 | 0 | SmMlIteratorFree(pMlElementTree->getSubElement(i)); |
26 | 0 | } |
27 | 0 | delete pMlElementTree; |
28 | 0 | } |
29 | | |
30 | | } // end namespace mathml |
31 | | |
32 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |