summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-11-14 23:13:26 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2011-11-15 00:34:56 -0500
commit011878812eac685b76a925fa9ffb17a152c27e6a (patch)
tree97e81eb8b8d490c0fc1695de2788eb956175e0fb /sc
parent1d8a5ef0a69549b30045c7785e077c2fc7ce52db (diff)
This can be for loop instead.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dptablecache.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index 2810b516cc30..cbf90653afb4 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -589,14 +589,13 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const
SCSIZE nEntryCount = rParam.GetEntryCount();
bool* pPasst = ( nEntryCount <= nFixedBools ? &aBool[0] : new bool[nEntryCount] );
- long nPos = -1;
- SCSIZE i = 0;
+ long nPos = -1;
CollatorWrapper* pCollator = (rParam.bCaseSens ? ScGlobal::GetCaseCollator() :
ScGlobal::GetCollator() );
::utl::TransliterationWrapper* pTransliteration = (rParam.bCaseSens ?
ScGlobal::GetCaseTransliteration() : ScGlobal::GetpTransliteration());
- while ((i < nEntryCount) && rParam.GetEntry(i).bDoQuery)
+ for (size_t i = 0; i < nEntryCount && rParam.GetEntry(i).bDoQuery; ++i)
{
const ScQueryEntry& rEntry = rParam.GetEntry(i);
const ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
@@ -768,7 +767,6 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const
pPasst[nPos] = bOk;
}
}
- i++;
}
for (long j=1; j <= nPos; j++)