Lars Gullik Bjønnes wrote: > Right. I have turned on completely on this issue... so expect to see a > lot of const added in future patches from me. > > - In delaration 'const' in POD (or value passed params) does not make > sense. > - In definition it is just like a local variable. (and we want > those const)
I did not know that, but it makes sense. Here comes the final patch. It has no functional nor const changes, only purely mechanical type changes, with one exception: -int LyXTabular::getCellNumber(int row, int column) const +LyXTabular::idx_type LyXTabular::getCellNumber(row_type row, + col_type column) const { - BOOST_ASSERT(column >= 0 || column < columns_ || row >= 0 || row < rows_); + BOOST_ASSERT(column != npos && column < columns_ && + row != npos && row < rows_); return cell_info[row][column].cellno; } I am not sure if LyXTabular::npos is really necessary, but I added it in order to be on the safe side. I used idx_type etc where possible, but size_t in some cases in the frontends in order not to pull in more headers. I am going to apply this if nobody objects. Georg
tabular-type4.diff.bz2
Description: BZip2 compressed data