]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Disambiguate a couple variable names in IL_INIT
authorterencehill <piuntn@gmail.com>
Wed, 3 Jul 2024 14:31:02 +0000 (16:31 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 3 Jul 2024 14:31:02 +0000 (16:31 +0200)
qcsrc/lib/intrusivelist.qh

index 4d28a291798d3eef525c2c1352f92681543fa641..0abc358352b38958c78613ac5b56259b01f7c41b 100644 (file)
@@ -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)));