From: terencehill Date: Wed, 3 Jul 2024 14:31:02 +0000 (+0200) Subject: Disambiguate a couple variable names in IL_INIT X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=73ffae1b4423d34b6e7d7452281b615d8e89cf9c;p=xonotic%2Fxonotic-data.pk3dir.git Disambiguate a couple variable names in IL_INIT --- diff --git a/qcsrc/lib/intrusivelist.qh b/qcsrc/lib/intrusivelist.qh index 4d28a2917..0abc35835 100644 --- a/qcsrc/lib/intrusivelist.qh +++ b/qcsrc/lib/intrusivelist.qh @@ -219,14 +219,14 @@ void IL_INIT(IntrusiveList this) { .entity nextfld, prevfld; for (int i = il_links_ptr; i < il_links_ptr + IL_MAX; ++i) { - int idx = i; - if (idx >= IL_MAX) idx -= IL_MAX; - int id = idx; - idx *= 2; + int id = i; + if (id >= IL_MAX) id -= IL_MAX; + if (!il_links[id]) { il_links[id] = this; - nextfld = il_links_flds[idx + 0]; - prevfld = il_links_flds[idx + 1]; + int flds_idx = id * 2; + nextfld = il_links_flds[flds_idx + 0]; + prevfld = il_links_flds[flds_idx + 1]; this.il_id = id; int bit = IL_FLOOR(id / IL_LISTS_PER_BIT); if (bit < (1 * 24)) this.il_listmask = '1 0 0' * (1 << (bit - (0 * 24)));