small code cleanup

This commit is contained in:
Enno Rehling 2020-02-02 18:52:30 +01:00
parent 855a989971
commit 4886d29401
2 changed files with 3 additions and 5 deletions

View file

@ -2358,9 +2358,8 @@ static void patzer_peasantmob(const castorder * co)
rsetpeasants(r, rpeasants(r) - n); rsetpeasants(r, rpeasants(r) - n);
assert(rpeasants(r) >= 0); assert(rpeasants(r) >= 0);
u = u = create_unit(r, f, n, get_race(RC_PEASANT), 0,
create_unit(r, f, n, get_race(RC_PEASANT), 0, LOC(f->locale, "angry_mob"), LOC(f->locale, "angry_mob"), NULL);
NULL);
fset(u, UFL_ISNEW); fset(u, UFL_ISNEW);
unit_addorder(u, create_order(K_GUARD, lang, NULL)); unit_addorder(u, create_order(K_GUARD, lang, NULL));
set_order(&u->thisorder, default_order(lang)); set_order(&u->thisorder, default_order(lang));

View file

@ -106,10 +106,9 @@ param_t findparam_block(const char *s, const struct locale *lang, bool any_local
bool isparam(const char *s, const struct locale * lang, param_t param) bool isparam(const char *s, const struct locale * lang, param_t param)
{ {
assert(s);
assert(param != P_GEBAEUDE); assert(param != P_GEBAEUDE);
assert(param != P_BUILDING); assert(param != P_BUILDING);
if (s[0] > '@') { if (s && s[0] > '@') {
param_t p = findparam(s, lang); param_t p = findparam(s, lang);
return p == param; return p == param;
} }