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
master
Giel van Schijndel 2008-07-14 17:53:03 +00:00
parent 6e9db52984
commit 9f3371dc33
1 changed files with 5 additions and 12 deletions

View File

@ -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;