From: Mikko Rasa Date: Fri, 20 Feb 2015 22:42:40 +0000 (+0200) Subject: Don't bother with creating intermediate steps for state updates X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=f061d5ccc9174bca15105db1fb90decdefef7d9d;p=r2c2.git 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. --- 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)