MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / MaybeAddToTodoSet

Function MaybeAddToTodoSet

src/signal.cpp:237–242  ·  view source on GitHub ↗

* Perform some operations before adding data into Todo set * The new and reverse direction is removed from Global set, because we are sure * it doesn't need to be checked again * Also, remove reverse direction from Todo set * This is the 'core' part so the graph searching won't enter any tile twice * * @param t1 tile we are entering * @param d1 direction (tile side) we are entering * @para

Source from the content-addressed store, hash-verified

235 * @return false iff the Todo buffer would be overrun
236 */
237static inline bool MaybeAddToTodoSet(TileIndex t1, DiagDirection d1, TileIndex t2, DiagDirection d2)
238{
239 if (!CheckAddToTodoSet(t1, d1, t2, d2)) return true;
240
241 return _tbdset.Add(t1, d1);
242}
243
244
245/** Current signal block state flags */

Callers 1

ExploreSegmentFunction · 0.85

Calls 2

CheckAddToTodoSetFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected