From f061d5ccc9174bca15105db1fb90decdefef7d9d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 21 Feb 2015 00:42:40 +0200 Subject: [PATCH] Don't bother with creating intermediate steps for state updates They were needed back when the wait system was different, but no longer have any use. --- source/libr2c2/trainrouteplanner.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/source/libr2c2/trainrouteplanner.cpp b/source/libr2c2/trainrouteplanner.cpp index 0140f43..4186f47 100644 --- a/source/libr2c2/trainrouteplanner.cpp +++ b/source/libr2c2/trainrouteplanner.cpp @@ -490,14 +490,8 @@ TrainRoutePlanner::RoutingStep::RoutingStep(const RoutingStep *p): void TrainRoutePlanner::RoutingStep::create_successors(list &new_steps) const { RoutingStep next(this); - if(next.update_states()) - { - if(next.check_deadlocks()) - return; - - new_steps.push_back(next); + if(next.update_states() && next.check_deadlocks()) return; - } int train_index = find_next_train(); if(train_index<0) -- 2.43.0