diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-01-07 13:30:26 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-01-07 13:30:26 +0100 |
commit | b91ac429108096a3de75b9b81ca2c637b27524ba (patch) | |
tree | c5fecc84faa6ed7fec01e7cff28f70107721e5c5 /actions.c | |
parent | c10788083cc013fb8f93cc5a223aab205e6da15c (diff) |
replaced function inverse() by macro
There was multiple problems with this function:
void inverse(int *bool);
First, we use "bool", which is actually a standard type, as the identifier.
Then, we cannot pass different types to the function without cast.
Then, inverse is not a meaninful name.
At last, we have to pass the address of the variable we want to inverse.
Fixed all these points by replacing the function by a macro :
#define inverse_boolean(_b) /* impl */
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'actions.c')
-rw-r--r-- | actions.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -97,7 +97,7 @@ void Fattaquer(SURFACES *surfaces,POSITIONS *positions,PERSONNAGES persos[],int } if (*Vtourallie==2) { - inverse(Vtour); + inverse_boolean(*Vtour); *Vtourallie=0; } else @@ -413,7 +413,7 @@ int Fpotion(SURFACES *surfaces,POSITIONS *positions,PERSONNAGES persos[],int *Vt if (*Vtourallie==2) { *Vtourallie=0; - inverse(Vtour); + inverse_boolean(*Vtour); } else { @@ -535,7 +535,7 @@ int Fether(SURFACES *surfaces,POSITIONS *positions,PERSONNAGES persos[],int *Vto if (*Vtourallie==2) { *Vtourallie=0; - inverse(Vtour); + inverse_boolean(*Vtour); } else { |