mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
bunch of bug fixes. rather important part of the bot fixes (oops:)
This commit is contained in:
parent
36f8dbf75a
commit
8b36ae6c00
1 changed files with 7 additions and 0 deletions
|
@ -63,6 +63,7 @@ typedef struct list_bucket_s list_bucket_t;
|
|||
if (head)
|
||||
head.prev = &e.next;
|
||||
head = e;
|
||||
count++;
|
||||
}
|
||||
|
||||
-(void) addItemAtTail: (id) item
|
||||
|
@ -73,6 +74,7 @@ typedef struct list_bucket_s list_bucket_t;
|
|||
e.prev = tail;
|
||||
tail[0] = e;
|
||||
tail = &e.next;
|
||||
count++;
|
||||
}
|
||||
|
||||
- (id) removeItem: (id) item
|
||||
|
@ -85,6 +87,7 @@ typedef struct list_bucket_s list_bucket_t;
|
|||
if (e.next)
|
||||
e.next.prev = e.prev;
|
||||
obj_free (e);
|
||||
count--;
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +106,10 @@ typedef struct list_bucket_s list_bucket_t;
|
|||
e.prev[0] = e.next;
|
||||
if (e.next)
|
||||
e.next.prev = e.prev;
|
||||
if (tail == &e.next)
|
||||
tail = e.prev;
|
||||
obj_free (e);
|
||||
count--;
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -120,6 +126,7 @@ typedef struct list_bucket_s list_bucket_t;
|
|||
if (e.next)
|
||||
e.next.prev = e.prev;
|
||||
obj_free (e);
|
||||
count--;
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue