From: "Shawn O. Pearce" <spearce@spearce.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Robin Rosenberg <robin.rosenberg.lists@dewire.com>, git@vger.kernel.org
Subject: Re: [JGIT PATCH 1/6] Add set to IntList
Date: Mon, 4 May 2009 07:55:06 -0700 [thread overview]
Message-ID: <20090504145506.GV23604@spearce.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0905041649570.5553@intel-tinevez-2-302>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Mon, 4 May 2009, Shawn O. Pearce wrote:
>
> > Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> > > l?rdag 02 maj 2009 04:08:42 skrev "Shawn O. Pearce" <spearce@spearce.org>:
> > > > 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.
next prev parent reply other threads:[~2009-05-04 14:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-02 2:08 [JGIT PATCH 0/6] Diff processing utilities Shawn O. Pearce
2009-05-02 2:08 ` [JGIT PATCH 1/6] Add set to IntList Shawn O. Pearce
2009-05-02 2:08 ` [JGIT PATCH 2/6] Add diff.Edit to describe an edit region within a file Shawn O. Pearce
2009-05-02 2:08 ` [JGIT PATCH 3/6] Add diff.EditList to provide for a list of Edit instances Shawn O. Pearce
2009-05-02 2:08 ` [JGIT PATCH 4/6] Add diff.RawText to index a file content for later compares Shawn O. Pearce
2009-05-02 2:08 ` [JGIT PATCH 5/6] Teach FileHeader, HunkHeader how to create an EditList Shawn O. Pearce
2009-05-02 2:08 ` [JGIT PATCH 6/6] Add diff.DiffFormatter to create Git style unified patch scripts Shawn O. Pearce
2009-05-03 0:03 ` [JGIT PATCH v2 " Shawn O. Pearce
2009-05-03 0:29 ` [JGIT PATCH v3 " Shawn O. Pearce
2009-05-03 7:07 ` [JGIT PATCH 1/6] Add set to IntList Robin Rosenberg
2009-05-04 14:22 ` Shawn O. Pearce
2009-05-04 14:50 ` Johannes Schindelin
2009-05-04 14:55 ` Shawn O. Pearce [this message]
2009-05-04 15:10 ` Johannes Schindelin
2009-05-03 14:24 ` [JGIT PATCH 0/6] Diff processing utilities Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090504145506.GV23604@spearce.org \
--to=spearce@spearce.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg.lists@dewire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).