From 6db1445db67ae29851a28cb80f8fd7a90109fd6d Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 2 May 2026 13:17:53 +0200 Subject: [PATCH] removed some more unused variables --- 3d-models.cpp | 8 +------- barriers.cpp | 2 -- checkmove.cpp | 2 -- goldberg-sub.cpp | 2 -- goldberg.cpp | 3 +-- rulegen3.cpp | 3 --- 6 files changed, 2 insertions(+), 18 deletions(-) diff --git a/3d-models.cpp b/3d-models.cpp index d85e84ce..1088f967 100644 --- a/3d-models.cpp +++ b/3d-models.cpp @@ -548,8 +548,6 @@ void geometry_information::make_revolution_cut(hpcshape &sh, int each, ld push, auto gbody = body; - int it = 0; - vector nextid(n); vector lastid(n); vector stillin(n, true); @@ -558,7 +556,6 @@ void geometry_information::make_revolution_cut(hpcshape &sh, int each, ld push, nextid[n-1] = n-1; lastid[0] = 0; while(true) { - it++; int cand = -1; ld cv = 0; for(int i=1; i pss; for(int i=head.s; icenter_z()) * hpc[i])); @@ -800,8 +795,7 @@ void geometry_information::adjust_eye(hpcshape& eye, hpcshape head, ld shift_eye ld mindist = 1e9; for(int i=0; i& ad, int j, cell *c) { int a = 0; for(auto& dd: ad1) if(dd == 1) a++; - int a0 = 0; - for(auto& dd: ad) if(dd == 1) a0++; return a < 6; } diff --git a/checkmove.cpp b/checkmove.cpp index 06bce420..953db451 100644 --- a/checkmove.cpp +++ b/checkmove.cpp @@ -341,7 +341,6 @@ EX void create_yasc_message() { bool in_ctx = true; set blocks; - int index = 0; for(auto c: all) { if(c.type == miENTITY && !captures.count({c.where, blocking_monster_name(c)})) blocks.insert(blocking_monster_name(c)); else if(c.type == miWALL && c.subtype == siMONSTER && !captures.count({c.where, blocking_monster_name(c)})) blocks.insert(blocking_monster_name(c)); @@ -361,7 +360,6 @@ EX void create_yasc_message() { else if(c.where && c.where->wall != cwt.at->wall) blocks.insert(dnameof(c.where->wall)); } else if(c.type == siWARP) blocks.insert("warp"); - index++; } if(!blocks.empty()) { diff --git a/goldberg-sub.cpp b/goldberg-sub.cpp index f70e492f..d6d1b4a1 100644 --- a/goldberg-sub.cpp +++ b/goldberg-sub.cpp @@ -13,7 +13,6 @@ EX subdivision su = subdivision::conformal; pair compute_all_areas(bool recolor) { map qty_of; map qty_of_standard; - ld totar = 0; map areas; @@ -26,7 +25,6 @@ pair compute_all_areas(bool recolor) { hs.push_back(hs[0]); ld area = abs(compute_area(hs)); - totar += area; qty_of[area]++; areas[c] = area; diff --git a/goldberg.cpp b/goldberg.cpp index 75ad902f..09878fa2 100644 --- a/goldberg.cpp +++ b/goldberg.cpp @@ -1509,9 +1509,8 @@ EX int get_pattern_value(cell *c) { auto h3 = h0->cmodmove(d+1); auto h2 = (heptspin(h0, d)+wstep-1+wstep).at; auto t = current_li.relative; if(v.second < 0) t = loc(0,1) * t; - int spins = 0; while(h1->fieldval > h0->fieldval || h2->fieldval > h0->fieldval || h3->fieldval > h0->fieldval) { - tie(h0, h1, h2, h3) = make_tuple(h1, h2, h3, h0); spins++; + tie(h0, h1, h2, h3) = make_tuple(h1, h2, h3, h0); t = t * loc(0,-1) + param * loc(0,1); } data = {h0->fieldval/S7, h1->fieldval/S7, t.first, t.second}; diff --git a/rulegen3.cpp b/rulegen3.cpp index 3a5af531..75f538ad 100644 --- a/rulegen3.cpp +++ b/rulegen3.cpp @@ -1288,9 +1288,6 @@ EX void test_transducers() { swap(cum, result); ctid = t_origin[ctid].at->cmove(c)->id; } - int err = 0; - for(auto duc: cum) for(auto p: duc.second.t) - if(p.first.first == ENDED || p.first.second != p.first.first) err++; throw_identity_errors(cum, cyc.dirs); if(id_size != isize(cum)) println(hlog, "error: identity not recovered correctly"); }