Remove CollFirst in favour of CollAt.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5176 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
8d8c676be2
commit
eadbb7dcb0
1 changed files with 4 additions and 16 deletions
|
@ -818,18 +818,6 @@ static unsigned CollIdAt (Collection* C, unsigned Index)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void* CollFirst (Collection* C)
|
|
||||||
/* Return the first item in a collection */
|
|
||||||
{
|
|
||||||
/* We must have at least one entry */
|
|
||||||
assert (C->Count > 0);
|
|
||||||
|
|
||||||
/* Return the element */
|
|
||||||
return C->Items[0].Ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void CollQuickSort (Collection* C, int Lo, int Hi,
|
static void CollQuickSort (Collection* C, int Lo, int Hi,
|
||||||
int (*Compare) (const void*, const void*))
|
int (*Compare) (const void*, const void*))
|
||||||
/* Internal recursive sort function. */
|
/* Internal recursive sort function. */
|
||||||
|
@ -1276,7 +1264,7 @@ static void CreateLineInfoList (LineInfoList* L, Collection* LineInfos)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Step 1: Determine the number of unique address entries needed */
|
/* Step 1: Determine the number of unique address entries needed */
|
||||||
LI = CollFirst (LineInfos);
|
LI = CollAt (LineInfos, 0);
|
||||||
L->Count += (LI->End - LI->Start) + 1;
|
L->Count += (LI->End - LI->Start) + 1;
|
||||||
End = LI->End;
|
End = LI->End;
|
||||||
for (I = 1; I < CollCount (LineInfos); ++I) {
|
for (I = 1; I < CollCount (LineInfos); ++I) {
|
||||||
|
@ -1304,7 +1292,7 @@ static void CreateLineInfoList (LineInfoList* L, Collection* LineInfos)
|
||||||
|
|
||||||
/* Step 3: Determine the number of entries per unique address */
|
/* Step 3: Determine the number of entries per unique address */
|
||||||
List = L->List;
|
List = L->List;
|
||||||
LI = CollFirst (LineInfos);
|
LI = CollAt (LineInfos, 0);
|
||||||
StartIndex = 0;
|
StartIndex = 0;
|
||||||
Start = LI->Start;
|
Start = LI->Start;
|
||||||
End = LI->End;
|
End = LI->End;
|
||||||
|
@ -1358,7 +1346,7 @@ static void CreateLineInfoList (LineInfoList* L, Collection* LineInfos)
|
||||||
|
|
||||||
/* Step 5: Enter the data into the table */
|
/* Step 5: Enter the data into the table */
|
||||||
List = L->List;
|
List = L->List;
|
||||||
LI = CollFirst (LineInfos);
|
LI = CollAt (LineInfos, 0);
|
||||||
StartIndex = 0;
|
StartIndex = 0;
|
||||||
Start = LI->Start;
|
Start = LI->Start;
|
||||||
End = LI->End;
|
End = LI->End;
|
||||||
|
|
Loading…
Add table
Reference in a new issue