Re: [JGIT PATCH 1/6] Add set to IntList

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
> On Mon, 4 May 2009, Shawn O. Pearce wrote:
> 
> > Robin Rosenberg <robin.rosenberg.lists@xxxxxxxxxx> wrote:
> > > l?rdag 02 maj 2009 04:08:42 skrev "Shawn O. Pearce" <spearce@xxxxxxxxxxx>:
> > > > Some applications may wish to modify an int list.
> > 
> > OK, as it turns out, this is used by code which Dscho wrote but I 
> > haven't packaged up as patches yet.  And I don't think that even uses 
> > the weird set(size(), ...) expands the list rules I implemented. So drop 
> > this patch for now from the series and I'll respin it at a later date.
> 
> Indeed, my code only needs add(int i), which should expand the array on 
> demand (i.e. after a clear(), it should _not_ blindly resize the array).

Really?  When I was starting to bring your code in and moved from
IntArray to IntList I had compile errors on set calls, so I added
it to IntList.

Huh.  Well, add(int) is already there, and clear() resets the size
to 0 but doesn't resize the internal array, so future adds up to
the prior capacity are free.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]