diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-02-11 09:49:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-02-11 12:18:36 +0100 |
commit | 7dfb69f53472cdeb21270e850892f82112ad332c (patch) | |
tree | fcf40e83712bd289d9626b0f45c307ebbe4f3c9b /formula | |
parent | aab2968434e4413565397692b74169a128117de8 (diff) |
merge the two identical nRecursionMax expressions
Change-Id: Ie8fdb999e9d7420f0e8bb27e9fd716148f7fc9f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110755
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 73669e84ff04..8e986de15dca 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1240,10 +1240,10 @@ void FormulaCompiler::AppendErrorConstant( OUStringBuffer& rBuffer, FormulaError rBuffer.append( mxSymbols->getSymbol( eOp)); } +constexpr short nRecursionMax = 42; bool FormulaCompiler::GetToken() { - static const short nRecursionMax = 42; FormulaCompilerRecursionGuard aRecursionGuard( nRecursion ); if ( nRecursion > nRecursionMax ) { @@ -2042,7 +2042,6 @@ void FormulaCompiler::CompareLine() OpCode FormulaCompiler::Expression() { - static const short nRecursionMax = 42; FormulaCompilerRecursionGuard aRecursionGuard( nRecursion ); if ( nRecursion > nRecursionMax ) { |