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

Method HasEdgeTo

src/linkgraph/linkgraph.h:138–141  ·  view source on GitHub ↗

* Check if an edge to a destination is present. * @param dest Wanted edge destination. * @return True if an edge is present. */

Source from the content-addressed store, hash-verified

136 * @return True if an edge is present.
137 */
138 bool HasEdgeTo(NodeID dest) const
139 {
140 return std::binary_search(this->edges.begin(), this->edges.end(), dest);
141 }
142
143 BaseEdge &operator[](NodeID to)
144 {

Callers 6

BaseNodeClass · 0.95
AddEdgeMethod · 0.95
UpdateEdgeMethod · 0.95
~StationMethod · 0.80
AddLinksMethod · 0.80
~LinkGraphJobMethod · 0.80

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected