sc/source/core/tool/interpr8.cxx | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-)
New commits: commit a5a731daec8dcb4f44bb618b71e6995ec1deb561 Author: Winfried Donkers <winfrieddonk...@libreoffice.org> Date: Wed May 4 08:10:48 2016 +0200 tdf#97831 follow up : use ScInterpreter::ReverseStack() Change-Id: Ic72a71ab4f90680f1e3496d68441151a36b8f41e Reviewed-on: https://gerrit.libreoffice.org/24630 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx index 58e94cf..5cb33f0 100644 --- a/sc/source/core/tool/interpr8.cxx +++ b/sc/source/core/tool/interpr8.cxx @@ -1396,15 +1396,7 @@ void ScInterpreter::ScConcat_MS() short nParamCount = GetByte(); //reverse order of parameter stack to simplify concatenation: - FormulaToken* p; - assert( sp >= nParamCount && " less stack elements than parameters"); - short nStackParams = std::min<short>( sp, nParamCount); - for ( short i = 0; i < short( nStackParams / 2 ); i++ ) - { - p = pStack[ sp - ( nStackParams - i ) ]; - pStack[ sp - ( nStackParams - i ) ] = pStack[ sp - 1 - i ]; - pStack[ sp - 1 - i ] = p; - } + ReverseStack( nParamCount ); size_t nRefInList = 0; while ( nParamCount-- > 0 && !nGlobalError ) @@ -1524,15 +1516,7 @@ void ScInterpreter::ScTextJoin_MS() if ( MustHaveParamCountMin( nParamCount, 3 ) ) { //reverse order of parameter stack to simplify processing - FormulaToken* p; - assert( sp >= nParamCount && " less stack elements than parameters"); - short nStackParams = std::min<short>( sp, nParamCount); - for ( short i = 0; i < short( nStackParams / 2 ); i++ ) - { - p = pStack[ sp - ( nStackParams - i ) ]; - pStack[ sp - ( nStackParams - i ) ] = pStack[ sp - 1 - i ]; - pStack[ sp - 1 - i ] = p; - } + ReverseStack( nParamCount ); // get aDelimiters and bSkipEmpty std::vector< OUString > aDelimiters; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits