diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2019-09-24 17:37:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-25 09:28:31 +0200 |
commit | b13421011d9377676e1adc282634991d5064a866 (patch) | |
tree | e1e73c7c200fa119dd5860d65b6fa1a4cbb814ac /sc/source/core | |
parent | 4d960908094292c9bac925976ac489c46a6127e9 (diff) |
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 <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/tool/token.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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 <com/sun/star/sheet/ReferenceFlags.hpp> #include <com/sun/star/sheet/NameToken.hpp> #include <utility> +#include <o3tl/sorted_vector.hxx> 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<OpCode> aThreadedCalcBlackList({ + static const o3tl::sorted_vector<OpCode> 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"); |