nsCellMap::HasMoreThanOneCell currently looks like this:
```
bool nsCellMap::HasMoreThanOneCell(int32_t aRowIndex) const {
const CellDataArray& row = mRows.SafeElementAt(aRowIndex, *sEmptyRow);
uint32_t maxColIndex = row.Length();
uint32_t count = 0;
uint32_t colIndex;
for (colIndex = 0; colIndex < maxColIndex; colIndex++) {
CellData* cellData = row[colIndex];
if (cellData && (cellData->GetCellFrame() || cellData->IsRowSpan()))
count++;
if (count > 1) return true;
}
return false;
}
```
It's only necessary to check if count is greater than 1 if count has been incremented since the last time it was checked. Moreover, it's only necessary to increment count if it is not already 2 or more.
Bug 1619041 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
nsCellMap::HasMoreThanOneCell currently looks like this:
```
bool nsCellMap::HasMoreThanOneCell(int32_t aRowIndex) const {
const CellDataArray& row = mRows.SafeElementAt(aRowIndex, *sEmptyRow);
uint32_t maxColIndex = row.Length();
uint32_t count = 0;
uint32_t colIndex;
for (colIndex = 0; colIndex < maxColIndex; colIndex++) {
CellData* cellData = row[colIndex];
if (cellData && (cellData->GetCellFrame() || cellData->IsRowSpan()))
count++;
if (count > 1) return true;
}
return false;
}
```
It's only necessary to check if count is greater than 1 if count has been incremented since the last time it was checked. Moreover, it's only necessary to increment count if it is not already equal to 1.