Re: [PATCH] getBuffer method in BufferList

2006-10-08 Thread Abdelrazak Younes
Andre Poenitz wrote: On Fri, Oct 06, 2006 at 11:54:32PM +0200, Abdelrazak Younes wrote: Guillaume Pothier wrote: Dunno haven't see it, you forgot the attachment ;-) ha! that's one of my favorites! Here is the attachment corresponding to my first mail. Got it but next time, if the patch is not

Re: [PATCH] getBuffer method in BufferList

2006-10-08 Thread Andre Poenitz
On Fri, Oct 06, 2006 at 11:54:32PM +0200, Abdelrazak Younes wrote: > Guillaume Pothier wrote: > >>Dunno haven't see it, you forgot the attachment ;-) > > > >ha! that's one of my favorites! > >Here is the attachment corresponding to my first mail. > > Got it but next time, if the patch is not very

Re: [PATCH] getBuffer method in BufferList

2006-10-06 Thread Guillaume Pothier
Right, so here is the patch that adds begin() and end() methods instead of returning (a copy of...) the buffer vector. g On 10/6/06, Abdelrazak Younes <[EMAIL PROTECTED]> wrote: Guillaume Pothier wrote: >> Dunno haven't see it, you forgot the attachment ;-) > > ha! that's one of my favorites! >

Re: [PATCH] getBuffer method in BufferList

2006-10-06 Thread Abdelrazak Younes
Guillaume Pothier wrote: Dunno haven't see it, you forgot the attachment ;-) ha! that's one of my favorites! Here is the attachment corresponding to my first mail. Got it but next time, if the patch is not very big please don't compress it. It's easier for review. Index: src/bufferlist.C =

Re: [PATCH] getBuffer method in BufferList

2006-10-06 Thread Abdelrazak Younes
Guillaume Pothier wrote: Dunno haven't see it, you forgot the attachment ;-) ha! that's one of my favorites! Here is the attachment corresponding to my first mail. Lars begin() and end() solution seems sound. Okay, what would be the return type? (sorry, my C++ is 10 years old) Would it be

Re: [PATCH] getBuffer method in BufferList

2006-10-06 Thread Guillaume Pothier
Dunno haven't see it, you forgot the attachment ;-) ha! that's one of my favorites! Here is the attachment corresponding to my first mail. Lars begin() and end() solution seems sound. Okay, what would be the return type? (sorry, my C++ is 10 years old) Would it be vector::const_iterator? Or

Re: [PATCH] getBuffer method in BufferList

2006-10-06 Thread Abdelrazak Younes
Guillaume Pothier wrote: I always say that a short solution is probably a good solution but it's a bit too short here ;-) Short it is indeed! The problem is not *that* complex... What do you think it lacks? Dunno haven't see it, you forgot the attachment ;-) Maybe another solution would b

Re: [PATCH] getBuffer method in BufferList

2006-10-06 Thread Guillaume Pothier
I always say that a short solution is probably a good solution but it's a bit too short here ;-) Short it is indeed! The problem is not *that* complex... What do you think it lacks? Maybe another solution would be to add a method that returns the number of available buffers, and use getBuffer(

Re: [PATCH] getBuffer method in BufferList

2006-10-06 Thread Lars Gullik Bjønnes
"Guillaume Pothier" <[EMAIL PROTECTED]> writes: | Hi, | | The BufferList class currently provide the first(), next(Buffer *) and | previous(Buffer *) methods for iterating on the buffers. These methods | cycle through the buffer list, which makes iteration a bit more | complicated than it should

Re: [PATCH] getBuffer method in BufferList

2006-10-06 Thread Abdelrazak Younes
Guillaume Pothier wrote: Hi, The BufferList class currently provide the first(), next(Buffer *) and previous(Buffer *) methods for iterating on the buffers. These methods cycle through the buffer list, which makes iteration a bit more complicated than it should be. I propose to add a getBuffers(

[PATCH] getBuffer method in BufferList

2006-10-06 Thread Guillaume Pothier
Hi, The BufferList class currently provide the first(), next(Buffer *) and previous(Buffer *) methods for iterating on the buffers. These methods cycle through the buffer list, which makes iteration a bit more complicated than it should be. I propose to add a getBuffers() method that returns a co