(svn r20685) -Codechange: Make BinaryHeap_Clear() a method.

This commit is contained in:
alberth
2010-08-29 13:38:43 +00:00
parent b06cedc905
commit 2c962548e5
3 changed files with 18 additions and 22 deletions

View File

@@ -18,9 +18,6 @@
//#define HASH_STATS
struct Queue;
typedef void Queue_ClearProc(Queue *q, bool free_values);
struct BinaryHeapNode {
void *item;
int priority;
@@ -31,12 +28,7 @@ struct Queue {
bool Push(void *item, int priority);
void *Pop();
bool Delete(void *item, int priority);
/* Clears the queue, by removing all values from it. Its state is
* effectively reset. If free_items is true, each of the items cleared
* in this way are free()'d.
*/
Queue_ClearProc *clear;
void Clear(bool free_values);
void Free(bool free_values);
uint max_size;