Re: getChar sanity

2003-09-16 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Tue, Sep 16, 2003 at 05:04:32PM +0200, Lars Gullik Bjønnes wrote: >> Be careful now remember that the standard dictates different >> return values for [] (not quite sure about at) >> >> test_[] depending on const or not. >> >> A lot safer to put

Re: getChar sanity

2003-09-16 Thread Andre Poenitz
On Tue, Sep 16, 2003 at 05:04:32PM +0200, Lars Gullik Bjønnes wrote: > Be careful now remember that the standard dictates different > return values for [] (not quite sure about at) > > test_[] depending on const or not. > > A lot safer to put an assert there and just use [] instead of at. As

Re: getChar sanity

2003-09-16 Thread Andre Poenitz
On Tue, Sep 16, 2003 at 03:57:02PM +, Angus Leeming wrote: > Andre Poenitz wrote: > > > if not, I'd like to replace this with an inlined > > > > Paragraph::value_type Paragraph::getChar(pos_type pos) const > > { > > text_.at(pos); > > } > > > > or even

Re: getChar sanity

2003-09-16 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | Does this Assert and the error message trigger often nowadays? > | Paragraph::value_type Paragraph::getChar(pos_type pos) const | { | // This is in the critical path! | pos_type const siz = text_.size(); > |

Re: getChar sanity

2003-09-16 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Andre Poenitz wrote: > >> if not, I'd like to replace this with an inlined >> >> Paragraph::value_type Paragraph::getChar(pos_type pos) const >> { >> text_.at(pos); >> } >> >> or even >> >> Paragraph::va

Re: getChar sanity

2003-09-16 Thread Angus Leeming
Andre Poenitz wrote: > if not, I'd like to replace this with an inlined > > Paragraph::value_type Paragraph::getChar(pos_type pos) const > { > text_.at(pos); > } > > or even > > Paragraph::value_type Paragraph::getChar(pos_type pos) const >

Re: getChar sanity

2003-09-16 Thread John Levon
On Tue, Sep 16, 2003 at 04:52:16PM +0200, Andre Poenitz wrote: > Does this Assert and the error message trigger often nowadays? It's pretty easy to trigger but not as common as it was. > for a 6% (or 9%) speedup... Let's do that before release. regards john -- Khendon's Law: If the same point

getChar sanity

2003-09-16 Thread Andre Poenitz
Does this Assert and the error message trigger often nowadays? Paragraph::value_type Paragraph::getChar(pos_type pos) const { // This is in the critical path! pos_type const siz = text_.size(); BOOST_ASSERT(pos <= siz);