Re: warning compiling math_data.C

2002-11-04 Thread Angus Leeming
On Monday 04 November 2002 11:33 am, Andre Poenitz wrote: > On Mon, Nov 04, 2002 at 10:47:00AM +, Angus Leeming wrote: > > No, the warning is generated in MathArray::notifyCursorLeaves() > > immediately below your snippet: > > // glue adjacent font insets of the same kind > > for (pos_t

Re: warning compiling math_data.C

2002-11-04 Thread Andre Poenitz
On Mon, Nov 04, 2002 at 12:47:53PM +0100, Lars Gullik Bjønnes wrote: > | But it is a '-1' which takes care of the one item removed by erase(). > | It is not the 'npos' concept ("last thing in a string"). > > npos is "not a position" Erm. Yes. Nevertheless, I still mean '-1' in the sense of 'one

Re: warning compiling math_data.C

2002-11-04 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Mon, Nov 04, 2002 at 10:47:00AM +, Angus Leeming wrote: >> No, the warning is generated in MathArray::notifyCursorLeaves() immediately >> below your snippet: >> // glue adjacent font insets of the same kind >> for (pos_type i = 0; i + 1

Re: warning compiling math_data.C

2002-11-04 Thread Andre Poenitz
On Mon, Nov 04, 2002 at 10:47:00AM +, Angus Leeming wrote: > No, the warning is generated in MathArray::notifyCursorLeaves() immediately > below your snippet: > // glue adjacent font insets of the same kind > for (pos_type i = 0; i + 1 < size(); ++i) { > MathFontInset

Re: warning compiling math_data.C

2002-11-04 Thread Angus Leeming
On Monday 04 November 2002 10:28 am, Andre Poenitz wrote: > On Fri, Nov 01, 2002 at 05:03:28PM +, Angus Leeming wrote: > > I won't do that because I'm not at all sure that this code is safe if it > > receives > > size = (size_type)-1; > > Should you not add a test that size is valid? Wh

Re: warning compiling math_data.C

2002-11-04 Thread Andre Poenitz
On Fri, Nov 01, 2002 at 05:03:28PM +, Angus Leeming wrote: > I won't do that because I'm not at all sure that this code is safe if it > receives > size = (size_type)-1; > Should you not add a test that size is valid? What should you do if it > isn't? Are we still talking about

Re: warning compiling math_data.C

2002-11-01 Thread Angus Leeming
Andre Poenitz wrote: > On Fri, Nov 01, 2002 at 04:32:14PM +, Angus Leeming wrote: >> André, I have a warning when compiling math_data.C. Wouldn't it be more >> elegant/comprehensible to define a MathCursor::npos if you're saying that >> the value is now invalid? > > Why not. Apply it if you w

Re: warning compiling math_data.C

2002-11-01 Thread Andre Poenitz
On Fri, Nov 01, 2002 at 04:32:14PM +, Angus Leeming wrote: > André, I have a warning when compiling math_data.C. Wouldn't it be more > elegant/comprehensible to define a MathCursor::npos if you're saying that > the value is now invalid? Why not. Apply it if you want (I am off now for the wee

warning compiling math_data.C

2002-11-01 Thread Angus Leeming
André, I have a warning when compiling math_data.C. Wouldn't it be more elegant/comprehensible to define a MathCursor::npos if you're saying that the value is now invalid? cxx: Warning: ../../../src/mathed/math_data.C, line 411: #68-D integer conversion resulted in a change of sign