Kaydet (Commit) 123206d0 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Reduce indentation by early bailout.

Change-Id: I8cbf348289acb98d30d8e295f296c43655b00a08
üst 01e63352
...@@ -163,37 +163,37 @@ void ScDPCacheTable::fillTable( ...@@ -163,37 +163,37 @@ void ScDPCacheTable::fillTable(
{ {
maFieldEntries.push_back( vector<SCROW>() ); maFieldEntries.push_back( vector<SCROW>() );
SCROW nMemCount = getCache()->GetDimMemberCount( nCol ); SCROW nMemCount = getCache()->GetDimMemberCount( nCol );
if ( nMemCount ) if (!nMemCount)
continue;
std::vector<SCROW> aAdded(nMemCount, -1);
for (SCROW nRow = 0; nRow < nRowCount; ++nRow)
{ {
std::vector<SCROW> aAdded( nMemCount, -1 ); SCROW nIndex = getCache()->GetItemDataId(nCol, nRow, bRepeatIfEmpty);
SCROW nOrder = getOrder(nCol, nIndex);
for (SCROW nRow = 0; nRow < nRowCount; ++nRow ) if (nCol == 0)
{ {
SCROW nIndex = getCache()->GetItemDataId( nCol, nRow, bRepeatIfEmpty ); maRowFlags.push_back(RowFlag());
SCROW nOrder = getOrder( nCol, nIndex ); maRowFlags.back().mbShowByFilter = false;
}
if ( nCol == 0 )
{
maRowFlags.push_back(RowFlag());
maRowFlags.back().mbShowByFilter = false;
}
if (!getCache()->ValidQuery(nRow, rQuery)) if (!getCache()->ValidQuery(nRow, rQuery))
continue; continue;
if ( bIgnoreEmptyRows && getCache()->IsRowEmpty( nRow ) ) if (bIgnoreEmptyRows && getCache()->IsRowEmpty(nRow))
continue; continue;
if ( nCol == 0 ) if (nCol == 0)
maRowFlags.back().mbShowByFilter = true; maRowFlags.back().mbShowByFilter = true;
aAdded[nOrder] = nIndex; aAdded[nOrder] = nIndex;
} }
for ( SCROW nRow = 0; nRow < nMemCount; nRow++ ) for (SCROW nRow = 0; nRow < nMemCount; ++nRow)
{ {
if ( aAdded[nRow] != -1 ) if (aAdded[nRow] != -1)
maFieldEntries.back().push_back( aAdded[nRow] ); maFieldEntries.back().push_back(aAdded[nRow]);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment