[Libreoffice-commits] core.git: sc/source

Tor Lillqvist tml at collabora.com
Sun Sep 20 05:58:03 PDT 2015


 sc/source/core/tool/calcconfig.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 14c44a1e4825911e9330f6ba961d4254cf6bff9b
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Sep 18 18:49:56 2015 +0300

    Try harder to avoid unnecessary work
    
    Change-Id: I200ed29d27bc3bd1e76e7a092507e03f4339a439

diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx
index 12f40a0..a2a6ed8 100644
--- a/sc/source/core/tool/calcconfig.cxx
+++ b/sc/source/core/tool/calcconfig.cxx
@@ -35,7 +35,7 @@ void ScCalcConfig::setOpenCLConfigToDefault()
 {
     // Keep in order of opcode value, is that clearest? (Random order,
     // at least, would make no sense at all.)
-    static const std::set<OpCode> aDefaultOpenCLSubsetOpCodes {
+    static OpCodeSet pDefaultOpenCLSubsetOpCodes(new std::set<OpCode>({
         ocAdd,
         ocSub,
         ocMul,
@@ -66,7 +66,7 @@ void ScCalcConfig::setOpenCLConfigToDefault()
         ocCovar,
         ocPearson,
         ocSlope,
-        ocSumIfs};
+        ocSumIfs}));
 
     // Note that these defaults better be kept in sync with those in
     // officecfg/registry/schema/org/openoffice/Office/Calc.xcs.
@@ -74,7 +74,7 @@ void ScCalcConfig::setOpenCLConfigToDefault()
     mbOpenCLSubsetOnly = true;
     mbOpenCLAutoSelect = true;
     mnOpenCLMinimumFormulaGroupSize = 100;
-    mpOpenCLSubsetOpCodes.reset(new std::set<OpCode>(aDefaultOpenCLSubsetOpCodes));
+    mpOpenCLSubsetOpCodes = pDefaultOpenCLSubsetOpCodes;
 }
 
 void ScCalcConfig::reset()


More information about the Libreoffice-commits mailing list