int LyXTabular::GetCellNumber(int row, int column) const
{
+#if 1
if (column >= columns_)
column = columns_ - 1;
else if (column < 0)
row = rows_ - 1;
else if (row < 0)
row = 0;
-
+#else
+ lyx::Assert(column < 0 || column >= columns_ || row < 0 || row >= rows_);
+#endif
return cell_info[row][column].cellno;
}
InsetText * LyXTabular::GetCellInset(int row, int column) const
{
-#ifdef WITH_WARNINGS
-#warning Juergen, should we check whether the row/column values are correct?
-// If we do not need to do that, the tests in GetCellNumber should be
-// changed to asserts.
-#endif
cur_cell = GetCellNumber(row, column);
return & cell_info[row][column].inset;
}