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

Prefer early bail-out.

Change-Id: I112a4be56910c07007b28715336fcd82d56bb313
üst 0e25fe33
...@@ -1103,7 +1103,9 @@ ScAttrIterator* ScColumn::CreateAttrIterator( SCROW nStartRow, SCROW nEndRow ) c ...@@ -1103,7 +1103,9 @@ ScAttrIterator* ScColumn::CreateAttrIterator( SCROW nStartRow, SCROW nEndRow ) c
void ScColumn::StartAllListeners() void ScColumn::StartAllListeners()
{ {
if ( !maItems.empty() ) if (maItems.empty())
return;
for (SCSIZE i = 0; i < maItems.size(); i++) for (SCSIZE i = 0; i < maItems.size(); i++)
{ {
ScBaseCell* pCell = maItems[i].pCell; ScBaseCell* pCell = maItems[i].pCell;
...@@ -1120,8 +1122,9 @@ void ScColumn::StartAllListeners() ...@@ -1120,8 +1122,9 @@ void ScColumn::StartAllListeners()
void ScColumn::StartNeededListeners() void ScColumn::StartNeededListeners()
{ {
if ( !maItems.empty() ) if (maItems.empty())
{ return;
for (SCSIZE i = 0; i < maItems.size(); i++) for (SCSIZE i = 0; i < maItems.size(); i++)
{ {
ScBaseCell* pCell = maItems[i].pCell; ScBaseCell* pCell = maItems[i].pCell;
...@@ -1137,7 +1140,6 @@ void ScColumn::StartNeededListeners() ...@@ -1137,7 +1140,6 @@ void ScColumn::StartNeededListeners()
} }
} }
} }
}
} }
...@@ -1166,8 +1168,9 @@ void ScColumn::BroadcastInArea( SCROW nRow1, SCROW nRow2 ) ...@@ -1166,8 +1168,9 @@ void ScColumn::BroadcastInArea( SCROW nRow1, SCROW nRow2 )
void ScColumn::StartListeningInArea( SCROW nRow1, SCROW nRow2 ) void ScColumn::StartListeningInArea( SCROW nRow1, SCROW nRow2 )
{ {
if ( !maItems.empty() ) if (maItems.empty())
{ return;
SCROW nRow; SCROW nRow;
SCSIZE nIndex; SCSIZE nIndex;
Search( nRow1, nIndex ); Search( nRow1, nIndex );
...@@ -1178,8 +1181,8 @@ void ScColumn::StartListeningInArea( SCROW nRow1, SCROW nRow2 ) ...@@ -1178,8 +1181,8 @@ void ScColumn::StartListeningInArea( SCROW nRow1, SCROW nRow2 )
((ScFormulaCell*)pCell)->StartListeningTo( pDocument ); ((ScFormulaCell*)pCell)->StartListeningTo( pDocument );
if ( nRow != maItems[nIndex].nRow ) if ( nRow != maItems[nIndex].nRow )
Search( nRow, nIndex ); // Inserted via Listening Search( nRow, nIndex ); // Inserted via Listening
nIndex++;
} ++nIndex;
} }
} }
......
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