From 5aa3b1161f63c58fd60b64b377dcac32376aba3f Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 14 Oct 2018 16:26:36 +0200 Subject: [PATCH] prefer unit_addorder over addlist where possible. --- src/laws.c | 2 +- src/spells.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/laws.c b/src/laws.c index 7e2250a59..4c2a29e4e 100644 --- a/src/laws.c +++ b/src/laws.c @@ -2911,7 +2911,7 @@ void maketemp_cmd(unit *u, order **olist) order *deford = default_order(u2->faction->locale); if (deford) { set_order(&u2->thisorder, NULL); - addlist(&u2->orders, deford); + unit_addorder(u2, deford); } } } diff --git a/src/spells.c b/src/spells.c index 00f256f26..dadce89c6 100644 --- a/src/spells.c +++ b/src/spells.c @@ -2348,7 +2348,7 @@ void patzer_peasantmob(const castorder * co) create_unit(r, f, n, get_race(RC_PEASANT), 0, LOC(f->locale, "angry_mob"), NULL); fset(u, UFL_ISNEW); - addlist(&u->orders, create_order(K_GUARD, lang, NULL)); + unit_addorder(u, create_order(K_GUARD, lang, NULL)); set_order(&u->thisorder, default_order(lang)); a = a_new(&at_unitdissolve); a->data.ca[0] = 1; /* An rpeasants(r). */