diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-04-01 00:27:17 +0200 |
---|---|---|
committer | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-04-01 11:03:38 +0000 |
commit | 1ed1b639fc80909cb006d74ac25516bcdd409041 (patch) | |
tree | 306ee88e8f76f28dee744b61b8322574398ccba3 /sc | |
parent | 0b1b361090cac1838f3a33e554fd44f0b3a9590a (diff) |
remove redundant OpCode casts
Change-Id: I75389b213ebf74aa35f935134e4f8122d28d2045
Reviewed-on: https://gerrit.libreoffice.org/35996
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/calcconfig.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/xeformula.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 2a0b1f305276..97863bbacd23 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -192,7 +192,7 @@ ScCalcConfig::OpCodeSet ScStringToOpCodeSet(const OUString& rOpCodes) { auto opcode(pHashMap->find(element)); if (opcode != pHashMap->end()) - result->insert(static_cast<OpCode>(opcode->second)); + result->insert(opcode->second); else SAL_WARN("sc.opencl", "Unrecognized OpCode " << element << " in OpCode set string"); } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index e5cef31ca269..3fc28488dc5b 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4708,8 +4708,8 @@ bool ScCompiler::HandleRange() // in short: if it isn't a self-contained expression. FormulaToken* p1 = pArr->PeekPrevNoSpaces(); FormulaToken* p2 = pArr->PeekNextNoSpaces(); - OpCode eOp1 = (p1 ? p1->GetOpCode() : static_cast<OpCode>( ocSep ) ); - OpCode eOp2 = (p2 ? p2->GetOpCode() : static_cast<OpCode>( ocSep ) ); + OpCode eOp1 = (p1 ? p1->GetOpCode() : ocSep); + OpCode eOp2 = (p2 ? p2->GetOpCode() : ocSep); bool bBorder1 = (eOp1 == ocSep || eOp1 == ocOpen); bool bBorder2 = (eOp2 == ocSep || eOp2 == ocClose); bool bAddPair = !(bBorder1 && bBorder2); @@ -5353,8 +5353,8 @@ bool ScCompiler::HandleColRowName() FormulaToken* p1 = pArr->PeekPrevNoSpaces(); FormulaToken* p2 = pArr->PeekNextNoSpaces(); // begin/end of a formula => single - OpCode eOp1 = p1 ? p1->GetOpCode() : static_cast<OpCode>( ocAdd ); - OpCode eOp2 = p2 ? p2->GetOpCode() : static_cast<OpCode>( ocAdd ); + OpCode eOp1 = p1 ? p1->GetOpCode() : ocAdd; + OpCode eOp2 = p2 ? p2->GetOpCode() : ocAdd; if ( eOp1 != ocColRowName && eOp1 != ocIntersect && eOp2 != ocColRowName && eOp2 != ocIntersect ) { diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index 79dce1e5bdc6..97e1907df15b 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -60,7 +60,7 @@ struct XclExpScToken explicit XclExpScToken() : mpScToken( nullptr ), mnSpaces( 0 ) {} bool Is() const { return mpScToken != nullptr; } StackVar GetType() const { return mpScToken ? mpScToken->GetType() : static_cast< StackVar >( svUnknown ); } - OpCode GetOpCode() const { return mpScToken ? mpScToken->GetOpCode() : static_cast< OpCode >( ocNone ); } + OpCode GetOpCode() const { return mpScToken ? mpScToken->GetOpCode() : ocNone; } }; /** Effective token class conversion types. */ |