From c6c31e01b863c4c5f0ba27c86838c825ef0ce4ea Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 7 Jan 2025 18:55:05 -0500 Subject: Calculate subway door reports after full reachability --- src/tracker_state.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/tracker_state.cpp b/src/tracker_state.cpp index eee43e4..d372786 100644 --- a/src/tracker_state.cpp +++ b/src/tracker_state.cpp @@ -360,6 +360,10 @@ class StateCalculator { // evaluated. for (const Door& door : GD_GetDoors()) { int discard = IsDoorReachable(door.id); + + door_report_[door.id] = {}; + discard = AreRequirementsSatisfied( + GetState().requirements.GetDoor(door.id), &door_report_[door.id]); } } @@ -522,14 +526,7 @@ class StateCalculator { } Decision IsDoorReachable_Helper(int door_id) { - if (door_report_.count(door_id)) { - door_report_[door_id].clear(); - } else { - door_report_[door_id] = {}; - } - - return AreRequirementsSatisfied(GetState().requirements.GetDoor(door_id), - &door_report_[door_id]); + return AreRequirementsSatisfied(GetState().requirements.GetDoor(door_id)); } Decision IsDoorReachable(int door_id) { -- cgit 1.4.1