From 2f11f9babb284bccdc2b13a8ba35c090b70a6a0e Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 19 Aug 2021 13:19:11 +0200 Subject: [PATCH] refactored clean_data and clean_parents --- rulegen.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/rulegen.cpp b/rulegen.cpp index 38d8c073..01086fd6 100644 --- a/rulegen.cpp +++ b/rulegen.cpp @@ -1312,12 +1312,23 @@ void find_single_live_branch(twalker at) { } } +EX void clean_data() { + analyzers.clear(); + important = t_origin; + } + +EX void clean_parents() { + clean_data(); + sidecache.clear(); + auto c = first_tcell; + while(c) { c->parent_dir = MYSTERY; c = c->next; } + } + EX void rules_iteration() { try_count++; if((try_count & (try_count-1)) == 0) { - analyzers.clear(); - important = t_origin; + clean_data(); } if(debugflags & DF_GEOM) println(hlog, "attempt: ", try_count);