diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-04 14:43:28 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-04 22:40:29 -0400 |
commit | 13bc18e4bdcb52b0146f9b6bad3bf7f1d18d8ee8 (patch) | |
tree | 4aeea338b66b87446d3993f29017c1f680051dac /sc | |
parent | 80697a92c0d5ffd093e6dca873c56fe13db19398 (diff) |
Using for loop here is better than while loop.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/table3.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index e4c7597d285a..99f3d2196558 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -1119,14 +1119,13 @@ bool ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam, std::vector<bool> aTestEqual(nEntryCount, false); long nPos = -1; - SCSIZE i = 0; bool bMatchWholeCell = pDocument->GetDocOptions().IsMatchWholeCell(); 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); // we can only handle one single direct query @@ -1432,7 +1431,6 @@ bool ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam, aTestEqual[nPos] = bTestEqual; } } - i++; } for ( long j=1; j <= nPos; j++ ) |