fix terrible code to avoid gcc 4.9 warning

This commit is contained in:
Enno Rehling 2015-03-02 23:12:02 +01:00
parent 6953ad4403
commit 76cce7f239
1 changed files with 4 additions and 4 deletions

View File

@ -611,8 +611,8 @@ int rpeasants(const region * r)
void rsetpeasants(region * r, int value) void rsetpeasants(region * r, int value)
{ {
((r)->land ? ((r)->land->peasants = if (r->land) r->land->peasants = value;
(value)) : (assert((value) >= 0), (value)), 0); else assert(value>=0);
} }
int rmoney(const region * r) int rmoney(const region * r)
@ -634,8 +634,8 @@ int rhorses(const region * r)
void rsetmoney(region * r, int value) void rsetmoney(region * r, int value)
{ {
((r)->land ? ((r)->land->money = if (r->land) r->land->money = value;
(value)) : (assert((value) >= 0), (value)), 0); else assert(value >= 0);
} }
void r_setdemand(region * r, const luxury_type * ltype, int value) void r_setdemand(region * r, const luxury_type * ltype, int value)