cast of pointer to int removed, now using unit type number for hash
This commit is contained in:
parent
7fbc465a53
commit
6325d69f3e
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue