diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-08-31 16:42:16 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2016-08-31 09:41:15 +0000 |
commit | ecafca50e9a6d0fac3c809f275342f571a1470df (patch) | |
tree | 1385226c71f473bdd9e2fe2c1a6df78ea4ad355e /starmath/qa | |
parent | 5b473e72787d2b61601ecea59ad8f5bf5f738229 (diff) |
Replace use of our own SmNodeIterator with range-based for loop
in starmath/source/cursor.cxx and starmath/qa/cppunit/mock-visitor.hxx.
Change-Id: I7733d5d17bb03532d6c4f1d6967c69d65bc3bede
Reviewed-on: https://gerrit.libreoffice.org/28538
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/qa')
-rw-r--r-- | starmath/qa/cppunit/mock-visitor.hxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/starmath/qa/cppunit/mock-visitor.hxx b/starmath/qa/cppunit/mock-visitor.hxx index 5c7c7af08884..2c7f6bf77efc 100644 --- a/starmath/qa/cppunit/mock-visitor.hxx +++ b/starmath/qa/cppunit/mock-visitor.hxx @@ -190,9 +190,11 @@ public: private: /** Auxiliary method for visiting the children of a pNode */ void VisitChildren( SmStructureNode* pNode ) { - SmNodeIterator it( pNode ); - while( it.Next() ) - it->Accept( this ); + for (auto pChild : *pNode) + { + if (pChild) + pChild->Accept(this); + } } }; |