summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2017-11-21 17:15:23 +0000
committerMichael Meeks <michael.meeks@collabora.com>2017-11-22 22:08:02 +0100
commitdf755b1b39fd501b18a513c342f4104dea7eaee8 (patch)
tree710cef0fcf69e5f672ad6389da499adabecb16fd /sc
parent7ced0f88e0af360d5b47b320b9dd23b692d8d1ad (diff)
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 <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/interpr4.cxx8
1 files changed, 4 insertions, 4 deletions
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