From 9f3371dc336f90ad9f85a0e90ad152fd689ce812 Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Mon, 14 Jul 2008 17:53:03 +0000 Subject: [PATCH] Remove macro TREAP_NODE_BASE and move its contents directly into TREAP_NODE as that's the only place where this macro is used. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5546 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/framework/treap.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lib/framework/treap.h b/lib/framework/treap.h index 8aa5af9d9..208e12056 100644 --- a/lib/framework/treap.h +++ b/lib/framework/treap.h @@ -48,24 +48,17 @@ typedef SDWORD (*TREAP_CMP)(const void *key1, const void *key2); -/* The basic elements in the treap node. - * These are done as macros so that the memory system - * can use parts of the treap system. - */ -#define TREAP_NODE_BASE \ - void *key; /* The key to sort the node on */ \ - UDWORD priority; /* Treap priority */ \ - void *pObj; /* The object stored in the treap */ \ - struct _treap_node *psLeft, *psRight /* The sub trees */ - /* The debug info */ #define TREAP_NODE_DEBUG \ const char *pFile; /* file the node was created in */ \ SDWORD line /* line the node was created at */ -typedef struct _treap_node +typedef struct TREAP_NODE { - TREAP_NODE_BASE; + void *key; //< The key to sort the node on + UDWORD priority; //< Treap priority + void *pObj; //< The object stored in the treap + struct TREAP_NODE *psLeft, *psRight; //< The sub trees #ifdef DEBUG_TREAP TREAP_NODE_DEBUG;