Angus Leeming wrote: > Andre Poenitz wrote: >> Lars seems to like the name 'end' reserved for iterators, not for >> integer offsets and suggested replacing it with something else. I >> do not really care, 'behind' or 'endpos' or similar if just fine >> with me. > > Ok, thanks. Isn't this what 'size()' does in other containers?
In fact, looking at the places it is used, wouldn't 'size()' and 'last()' be exactly what is meant? (where last() returns size() - 1) $ grep 'end()' src/*.C | grep row src/lyxrow.C:pos_type Row::end() const src/lyxrow_funcs.C: return row.end() == par.size(); src/lyxrow_funcs.C: pos_type pos = row.end() - 1; src/rowpainter.C: if (boost::next(row_) == pit2->rows.end()) src/rowpainter.C: ParagraphList::iterator end = text.ownerParagraphs().end(); src/rowpainter.C: RowList::iterator rend = pit->rows.end(); src/texrow.C: find_if(rowlist.begin(), rowlist.end(), src/texrow.C: if (cit != rowlist.end()) { src/texrow.C: rowlist.insert(rowlist.end(), tr.rowlist.begin(), tr.rowlist.end()); src/text2.C: bool const lastrow = lyxrc.rtl_support && row.end() == pit->size(); src/text.C: RowList::iterator end = pit->rows.end(); src/text.C: if (row.end() == pit->size()) { src/text.C: if (row.end() < pit->size()) { src/text.C: InsetOld * in = pit->getInset(row.end()); src/text.C: && row.end() < pit->size() src/text.C: && !pit->isNewline(row.end()) src/text.C: RowList::iterator rit = boost::prior(par.rows.end()); src/text.C: return ownerParagraphs().back().rows.end(); src/text.C: if (rit == pit->rows.end()) { src/text.C: rit = boost::prior(pit->rows.end()); src/text.C: RowList::iterator rit = boost::prior(pit->rows.end()); -- Angus