Re: [patch] fix CursorSlice wrong const semantics

2007-08-18 Thread Alfredo Braunstein
Alfredo Braunstein wrote: > // suppose we want the function to avoid touching the data > void somefun(CursorSlice const & a) > { > CursorSlice & b = a; Sorry, should be CursorSlice b = a; :-) > b.paragraph().erase(); > ... > } A/

[patch] fix CursorSlice wrong const semantics

2007-08-17 Thread Alfredo Braunstein
The following patch eliminates wrong const semantics in cursorslice. The problem is that a CursorSlice const should mean that the CursorSlice is constant, not the pointed data. In the current code the mechanism is partially abused. And I see that DocIterator suffers from the same... Btw, the curr