From: uz Date: Fri, 12 Aug 2011 16:10:34 +0000 (+0000) Subject: Grow the Span collection before adding spans for the segments. This means that X-Git-Tag: V2.13.3~305 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=762d4d9ea25427fbc0736ffcf95cb96ba6907402;p=cc65 Grow the Span collection before adding spans for the segments. This means that in most cases the colection will have the optimal size. git-svn-id: svn://svn.cc65.org/cc65/trunk@5157 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/span.c b/src/ca65/span.c index 47db633b0..69d44ca45 100644 --- a/src/ca65/span.c +++ b/src/ca65/span.c @@ -90,6 +90,9 @@ void OpenSpans (Collection* Spans) { unsigned I; + /* Grow the Spans collection as necessary */ + CollGrow (Spans, CollCount (&SegmentList)); + /* Add the currently active segment */ CollAppend (Spans, NewSpan (ActiveSeg, ActiveSeg->PC, ActiveSeg->PC));