sc/source/core/tool/interpr4.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit df755b1b39fd501b18a513c342f4104dea7eaee8 Author: Michael Meeks <michael.me...@collabora.com> Date: Tue Nov 21 17:15:23 2017 +0000 Avoid using the hideous std::stack -> deque inside ::Interpret dequeue loves to allocate and free memory crazily, vector is much saner. Change-Id: Idcd2c1d693594f280ce94423161651502f25dc2d Reviewed-on: https://gerrit.libreoffice.org/45086 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 28f14137f077..67052e8906d4 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3959,7 +3959,7 @@ StackVar ScInterpreter::Interpret() sal_uLong nRetIndexExpr = 0; sal_uInt16 nErrorFunction = 0; sal_uInt16 nErrorFunctionCount = 0; - std::stack<sal_uInt16> aErrorFunctionStack; + std::vector<sal_uInt16> aErrorFunctionStack; sal_uInt16 nStackBase; nGlobalError = FormulaError::NONE; @@ -4522,15 +4522,15 @@ StackVar ScInterpreter::Interpret() if ( nLevel == 1 || (nLevel == 2 && aCode.IsEndOfPath()) ) { if (nLevel == 1) - aErrorFunctionStack.push( nErrorFunction); + aErrorFunctionStack.push_back( nErrorFunction); bGotResult = JumpMatrix( nLevel ); if (aErrorFunctionStack.empty()) assert(!"ScInterpreter::Interpret - aErrorFunctionStack empty in JumpMatrix context"); else { - nErrorFunction = aErrorFunctionStack.top(); + nErrorFunction = aErrorFunctionStack.back(); if (bGotResult) - aErrorFunctionStack.pop(); + aErrorFunctionStack.pop_back(); } } else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits