From 762d4d9ea25427fbc0736ffcf95cb96ba6907402 Mon Sep 17 00:00:00 2001 From: uz Date: Fri, 12 Aug 2011 16:10:34 +0000 Subject: [PATCH] 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 --- src/ca65/span.c | 3 +++ 1 file changed, 3 insertions(+) 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)); -- 2.39.5