diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-02-01 16:42:19 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-02-02 12:07:12 +0100 |
commit | d27ef675ec23f45562972da66bde02d99d778141 (patch) | |
tree | e6623a0e739b104f2f96ce30dd7e5f2b84c79945 /starmath/source/mathmlimport.cxx | |
parent | 1287081fa5c132057e01c60a26c6f64156e5bc73 (diff) |
Replace some front/pop_front by for-range loops+clear
Change-Id: I8a9239667b0d80ee2fa6ebbc8a19ba4c0076c2fb
Reviewed-on: https://gerrit.libreoffice.org/49107
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'starmath/source/mathmlimport.cxx')
-rw-r--r-- | starmath/source/mathmlimport.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index f549cda0ad88..85361823fbf2 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -2696,14 +2696,14 @@ void SmXMLTableContext_Impl::EndElement() throw std::range_error("row limit"); aExpressionArray.resize(nCols*nRows); size_t j=0; - while ( !aReverseStack.empty() ) + for (auto & elem : aReverseStack) { - std::unique_ptr<SmStructureNode> xArray(static_cast<SmStructureNode*>(aReverseStack.front().release())); - aReverseStack.pop_front(); + std::unique_ptr<SmStructureNode> xArray(static_cast<SmStructureNode*>(elem.release())); for (size_t i = 0; i < xArray->GetNumSubNodes(); ++i) aExpressionArray[j++] = xArray->GetSubNode(i); xArray->SetSubNodes(SmNodeArray()); } + aReverseStack.clear(); SmToken aToken; aToken.cMathChar = '\0'; |