diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2016-01-03 16:18:46 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2016-01-04 03:40:09 +0100 |
commit | c4a90354df1009cd24a3ac4d1c72624759e7fe16 (patch) | |
tree | 0e8da7666ee7a1327e2240fd7f225299e47843a9 /sc/source/core | |
parent | 4a8c0d313540bd78c9c381edd548b976c580ca9a (diff) |
let us use the standard way to implement an if .. else if
Change-Id: Ie0b3efdbe23a163aab1e8d128217ee1f1c7fd287
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/tool/token.cxx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 05221e7554fb..8e62a267d1f5 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1514,10 +1514,8 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) default: meVectorState = FormulaVectorDisabled; } - return; } - - if (eOp == ocPush) + else if (eOp == ocPush) { // This is a stack variable. See if this is a reference. @@ -1557,28 +1555,23 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) default: ; } - return; } - - if (eOp >= SC_OPCODE_START_BIN_OP && + else if (eOp >= SC_OPCODE_START_BIN_OP && eOp <= SC_OPCODE_STOP_UN_OP && ScInterpreter::GetGlobalConfig().mbOpenCLSubsetOnly && ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->find(eOp) == ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->end()) { meVectorState = FormulaVectorDisabled; - return; } - // only when openCL interpreter is not enabled - the assumption is that // the S/W interpreter blacklist is more strict - if (eOp >= SC_OPCODE_START_BIN_OP && + else if (eOp >= SC_OPCODE_START_BIN_OP && eOp <= SC_OPCODE_STOP_UN_OP && ScCalcConfig::isSwInterpreterEnabled() && (dynamic_cast<sc::FormulaGroupInterpreterSoftware*>(sc::FormulaGroupInterpreter::getStatic()) != nullptr) && ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->find(eOp) == ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->end()) { meVectorState = FormulaVectorDisabled; - return; } } |