[Libreoffice-commits] core.git: sc/source
Stephan Bergmann
sbergman at redhat.com
Fri Aug 30 14:42:20 PDT 2013
sc/source/core/opencl/formulagroupcl.cxx | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
New commits:
commit d835c0ffc69bc29a18681e938dd71b988109a139
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Aug 30 23:41:56 2013 +0200
-Werror,-Wswitch
Change-Id: I4fec831898b65737fe4b81b576891b28a3fb6cba
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index a835c46..c082391 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -218,13 +218,9 @@ bool FormulaGroupInterpreterOpenCL::getPosition(const ScTokenArray& rCode,const
bool isAllocFormulaOclBuf = true;
for ( const formula::FormulaToken* p = rCodePos->First(); p; p = rCodePos->Next() )
{
- switch ( p->GetType() )
+ if ( p->GetType() == formula::svDoubleVectorRef )
{
- case formula::svDoubleVectorRef:
- {
- nColPosition++;
- break;
- }
+ nColPosition++;
}
}
int nPositionSize = nColPosition * nRowSize;
@@ -241,19 +237,16 @@ bool FormulaGroupInterpreterOpenCL::getPosition(const ScTokenArray& rCode,const
int j = 0;
for ( const formula::FormulaToken* p = rCodeTemp->First(); p; p = rCodeTemp->Next() )
{
- switch (p->GetType())
+ if (p->GetType() == formula::svDoubleVectorRef)
{
- case formula::svDoubleVectorRef:
- {
- const formula::DoubleVectorRefToken* p2 = static_cast<const formula::DoubleVectorRefToken*>(p);
- size_t nRowStart = p2->IsStartFixed() ? 0 : i;
- size_t nRowEnd = p2->GetRefRowSize() - 1;
- if (!p2->IsEndFixed())
- nRowEnd += i;
- npOclStartPos[j*nRowSize+i] = nRowStart;//record the start position
- npOclEndPos[j*nRowSize+i] = nRowEnd;//record the end position
- j++;
- }
+ const formula::DoubleVectorRefToken* p2 = static_cast<const formula::DoubleVectorRefToken*>(p);
+ size_t nRowStart = p2->IsStartFixed() ? 0 : i;
+ size_t nRowEnd = p2->GetRefRowSize() - 1;
+ if (!p2->IsEndFixed())
+ nRowEnd += i;
+ npOclStartPos[j*nRowSize+i] = nRowStart;//record the start position
+ npOclEndPos[j*nRowSize+i] = nRowEnd;//record the end position
+ j++;
}
}
}
More information about the Libreoffice-commits
mailing list