summaryrefslogtreecommitdiff
path: root/src/queue.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-03-07 12:11:48 +0000
committerrubidium <rubidium@openttd.org>2007-03-07 12:11:48 +0000
commit24c4d5b06d231785db01500360c26815d8fe4d15 (patch)
tree757477dbdc02025cc29690a4e66e40f872cab02b /src/queue.h
parent36bb92ae241403d61dc7a3e5a1696b615be61395 (diff)
downloadopenttd-24c4d5b06d231785db01500360c26815d8fe4d15.tar.xz
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
Diffstat (limited to 'src/queue.h')
-rw-r--r--src/queue.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/queue.h b/src/queue.h
index d65dee466..6698531f2 100644
--- a/src/queue.h
+++ b/src/queue.h
@@ -9,21 +9,19 @@
//#define HASH_STATS
-typedef struct Queue Queue;
+struct Queue;
typedef bool Queue_PushProc(Queue* q, void* item, int priority);
typedef void* Queue_PopProc(Queue* q);
typedef bool Queue_DeleteProc(Queue* q, void* item, int priority);
typedef void Queue_ClearProc(Queue* q, bool free_values);
typedef void Queue_FreeProc(Queue* q, bool free_values);
-typedef struct InsSortNode InsSortNode;
struct InsSortNode {
void* item;
int priority;
InsSortNode* next;
};
-typedef struct BinaryHeapNode BinaryHeapNode;
struct BinaryHeapNode {
void* item;
int priority;
@@ -99,7 +97,6 @@ void init_BinaryHeap(Queue* q, uint max_size);
/*
* Hash
*/
-typedef struct HashNode HashNode;
struct HashNode {
uint key1;
uint key2;
@@ -111,7 +108,7 @@ struct HashNode {
* the resulting range is clearly defined.
*/
typedef uint Hash_HashProc(uint key1, uint key2);
-typedef struct Hash {
+struct Hash {
/* The hash function used */
Hash_HashProc* hash;
/* The amount of items in the hash */
@@ -123,7 +120,7 @@ typedef struct Hash {
/* A pointer to an array of numbuckets booleans, which will be true if
* there are any Nodes in the bucket */
bool* buckets_in_use;
-} Hash;
+};
/* Call these function to manipulate a hash */