On Mon, Nov 26, 2001 at 01:37:29PM +0100, Lars Gullik Bjønnes wrote: > Ok, mostly happy with it. > The only thing that bothers me a bit now is that we have: > > BufferView::pos_type > LyXText::pos_type > LyXRow::pos_type > Paragraph::pos_type > > etc. > > can't we do with just lyx::pos_type?
We can. What about applying the patch first and do the political bits later? > space_inserted = true; > } else { > - const Paragraph::size_type nb = 8 - pos % 8; > - for (Paragraph::size_type a = 0; > + const Paragraph::pos_type nb = 8 - pos % 8; > > const in wrong place. Yes. This is due to my daytime work which uses "const in wrong places". I tend to adher to LyX style within LyX. But sometimes I fail. Shame on me. > + for (Paragraph::pos_type a = 0; > a < nb ; ++a) { > par->insertChar(pos, ' ', font); > ++pos; > > +inline bool isMetaInset(Paragraph const * par, Paragraph::pos_type const pos) > +{ > + return par->getChar(pos) == Paragraph::META_INSET; > +} > + > > so isMetaInset is back? It's probably a wrongly resolved merge conflict. I did not intend to use it. > void Paragraph::Pimpl::simpleTeXBlanks(std::ostream & os, TexRow & texrow, > - Paragraph::size_type const i, > + pos_type const i, > > this (i) should not be const. It is a 1-to-1 replacement of the former 'Paragraph::size_type' by 'pos_type'. Of course the 'const' is bogus, but it has been in there, it's just a bit more visible now. > - Paragraph::value_type const c) > + value_type const c) > > 'c' should not be const. Dito. > - for (Paragraph::size_type i = pos+1; i < par->size(); ++i) > + for (pos_type i = pos+1; i < par->size(); ++i) > > spaces... > Again: This is not my doing. Is anything wrong with trying to approach a target with several steps? I usually fail in real life doing otherwise if the target is further than two meters away... Andre' -- André Pönitz .............................................. [EMAIL PROTECTED]