minor fix, moved a method call outside an assert macro

This commit is contained in:
buster%netscape.com 1998-10-20 14:35:41 +00:00
Родитель e5c3ad0022
Коммит a5d86175fd
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -336,7 +336,8 @@ PRBool nsCellMap::RowHasSpanningCells(PRInt32 aRowIndex)
*/
PRBool nsCellMap::ColIsSpannedInto(PRInt32 aColIndex)
{
NS_PRECONDITION (0<=aColIndex && aColIndex<GetColCount(), "bad col index arg");
PRInt32 colCount = GetColCount();
NS_PRECONDITION (0<=aColIndex && aColIndex<colCount, "bad col index arg");
PRBool result = PR_FALSE;
PRInt32 rowCount = GetRowCount();
for (PRInt32 rowIndex=0; rowIndex<rowCount; rowIndex++)
@ -373,10 +374,9 @@ PRBool nsCellMap::ColIsSpannedInto(PRInt32 aColIndex)
*/
PRBool nsCellMap::ColHasSpanningCells(PRInt32 aColIndex)
{
NS_PRECONDITION (0<=aColIndex && aColIndex<GetColCount(), "bad col index arg");
PRBool result = PR_FALSE;
const PRInt32 colCount = GetColCount();
if (aColIndex!=colCount-1)
if (aColIndex<colCount-1)
{ // aColIndex is not the last col, so we check the next col after aColIndex for spanners
const PRInt32 rowCount = GetRowCount();
for (PRInt32 rowIndex=0; rowIndex<rowCount; rowIndex++)

Просмотреть файл

@ -336,7 +336,8 @@ PRBool nsCellMap::RowHasSpanningCells(PRInt32 aRowIndex)
*/
PRBool nsCellMap::ColIsSpannedInto(PRInt32 aColIndex)
{
NS_PRECONDITION (0<=aColIndex && aColIndex<GetColCount(), "bad col index arg");
PRInt32 colCount = GetColCount();
NS_PRECONDITION (0<=aColIndex && aColIndex<colCount, "bad col index arg");
PRBool result = PR_FALSE;
PRInt32 rowCount = GetRowCount();
for (PRInt32 rowIndex=0; rowIndex<rowCount; rowIndex++)
@ -373,10 +374,9 @@ PRBool nsCellMap::ColIsSpannedInto(PRInt32 aColIndex)
*/
PRBool nsCellMap::ColHasSpanningCells(PRInt32 aColIndex)
{
NS_PRECONDITION (0<=aColIndex && aColIndex<GetColCount(), "bad col index arg");
PRBool result = PR_FALSE;
const PRInt32 colCount = GetColCount();
if (aColIndex!=colCount-1)
if (aColIndex<colCount-1)
{ // aColIndex is not the last col, so we check the next col after aColIndex for spanners
const PRInt32 rowCount = GetRowCount();
for (PRInt32 rowIndex=0; rowIndex<rowCount; rowIndex++)