From 2c074a7088e5e721b60ef59cfe7be836545b2e92 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 5 Aug 2021 11:56:49 +0200 Subject: [PATCH] rulegen:: analyzer improvements --- rulegen.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rulegen.cpp b/rulegen.cpp index 716217de..9fff1183 100644 --- a/rulegen.cpp +++ b/rulegen.cpp @@ -421,7 +421,10 @@ void unify_distances(tcell *c1, tcell *c2) { void handle_distance_errors() { bool b = solid_errors; solid_errors = 0; - if(b && !no_errors) throw hr_solid_error(); + if(b && !no_errors) { + analyzers.clear(); + throw hr_solid_error(); + } } /** make sure that we know c->dist */ @@ -555,7 +558,7 @@ void analyzer::add_step(int pid, int s) { spin.push_back(s); } -map analyzers; +EX map analyzers; EX aid_t get_aid(twalker cw) { ufind(cw); @@ -597,8 +600,8 @@ void extend_analyzer(twalker cw_target, int dir, int id, int mism, twalker rg) { twalker cw_conflict = cw_target + dir + wstep; auto &a_target = get_analyzer(cw_target); auto &a_conflict = get_analyzer(cw_conflict); - twalker model = a_target.spread[0] + dir + wstep; - auto res = spread(a_conflict, model); + // twalker model = a_target.spread[0] + dir + wstep; + // auto res = spread(a_conflict, model); vector ids_to_add; int k = id; while(k) {