[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Thu Mar 24 17:27:05 UTC 2016
sc/source/core/tool/token.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 64afe3040bf3d07bb0b13f03b33fce074383ee39
Author: Eike Rathke <erack at redhat.com>
Date: Thu Mar 24 18:22:56 2016 +0100
const as const can
Change-Id: I6826c2f12d601a91462af454b90272ea7a7e932f
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index a8f27bf..154868e 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2528,11 +2528,11 @@ bool ScTokenArray::ReferencesSheet( SCTAB nTab, SCTAB nPosTab ) const
TokenPointers aPtrs( pCode, nLen, pRPN, nRPN, false);
for (size_t j=0; j<2; ++j)
{
- FormulaToken** pp = aPtrs.maPointerRange[j].mpStart;
- FormulaToken** pEnd = aPtrs.maPointerRange[j].mpStop;
+ FormulaToken* const * pp = aPtrs.maPointerRange[j].mpStart;
+ FormulaToken* const * const pEnd = aPtrs.maPointerRange[j].mpStop;
for (; pp != pEnd; ++pp)
{
- FormulaToken* p = aPtrs.getHandledToken(j,pp);
+ const FormulaToken* p = aPtrs.getHandledToken(j,pp);
if (!p)
continue;
@@ -2540,9 +2540,9 @@ bool ScTokenArray::ReferencesSheet( SCTAB nTab, SCTAB nPosTab ) const
{
case svDoubleRef :
{
- ScComplexRefData& rRef = *p->GetDoubleRef();
- ScSingleRefData& rRef2 = rRef.Ref2;
- ScSingleRefData& rRef1 = rRef.Ref1;
+ const ScComplexRefData& rRef = *p->GetDoubleRef();
+ const ScSingleRefData& rRef2 = rRef.Ref2;
+ const ScSingleRefData& rRef1 = rRef.Ref1;
SCTAB nTab1 = (rRef1.IsTabRel() ? rRef1.Tab() + nPosTab : rRef1.Tab());
SCTAB nTab2 = (rRef2.IsTabRel() ? rRef2.Tab() + nPosTab : rRef2.Tab());
@@ -2552,7 +2552,7 @@ bool ScTokenArray::ReferencesSheet( SCTAB nTab, SCTAB nPosTab ) const
break;
case svSingleRef :
{
- ScSingleRefData& rRef = *p->GetSingleRef();
+ const ScSingleRefData& rRef = *p->GetSingleRef();
if (rRef.IsTabRel())
{
if (rRef.Tab() + nPosTab == nTab)
More information about the Libreoffice-commits
mailing list