From 6325d69f3eb2301fdc546153b8fde0211d924a0f Mon Sep 17 00:00:00 2001 From: johns <> Date: Sun, 7 May 2000 15:27:23 +0000 Subject: [PATCH] cast of pointer to int removed, now using unit type number for hash --- src/unit/depend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unit/depend.cpp b/src/unit/depend.cpp index 964153811..073c4aaf0 100644 --- a/src/unit/depend.cpp +++ b/src/unit/depend.cpp @@ -217,7 +217,7 @@ global void AddDependency(const char* target,const char* required,int count DebugLevel0(__FUNCTION__": wrong dependency target %s\n",target); return; } - hash=(int)rule.Kind.UnitType%(sizeof(DependHash)/sizeof(*DependHash)); + hash=rule.Kind.UnitType->Type%(sizeof(DependHash)/sizeof(*DependHash)); DebugLevel3("Hash %d\n",hash); // @@ -328,7 +328,7 @@ global int CheckDependByIdent(const Player* player,const char* target) // // Find rule // - i=(int)rule.Kind.UnitType%(sizeof(DependHash)/sizeof(*DependHash)); + i=rule.Kind.UnitType->Type%(sizeof(DependHash)/sizeof(*DependHash)); if( (node=DependHash[i]) ) { // find correct entry while( node->Type!=rule.Type