From b13421011d9377676e1adc282634991d5064a866 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 24 Sep 2019 17:37:36 +0200 Subject: better data structures for some static const vars use compact, cache-friendly structures for some static const stuff and add a std::initialiser_list constructor to o3tl::sorted_vector Change-Id: I6a6049bf19a7f48dae1843a81cd2257944ada9d5 Reviewed-on: https://gerrit.libreoffice.org/79470 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- sc/source/core/tool/token.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sc') diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 14a39306eb5f..b9048dd25f19 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -61,6 +61,7 @@ using ::std::vector; #include #include #include +#include using namespace formula; using namespace com::sun::star; @@ -1276,7 +1277,7 @@ bool ScTokenArray::AddFormulaToken( void ScTokenArray::CheckForThreading( const FormulaToken& r ) { - static const std::set aThreadedCalcBlackList({ + static const o3tl::sorted_vector aThreadedCalcBlackList({ ocIndirect, ocMacro, ocOffset, @@ -1319,7 +1320,7 @@ void ScTokenArray::CheckForThreading( const FormulaToken& r ) OpCode eOp = r.GetOpCode(); - if (aThreadedCalcBlackList.count(eOp)) + if (aThreadedCalcBlackList.find(eOp) != aThreadedCalcBlackList.end()) { SAL_INFO("sc.core.formulagroup", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << "(" << int(eOp) << ") disables threaded calculation of formula group"); -- cgit