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

Method Remove

src/signal.cpp:121–131  ·  view source on GitHub ↗

* Tries to remove first instance of given tile and dir * @param tile tile * @param dir and dir to remove * @return element was found and removed */

Source from the content-addressed store, hash-verified

119 * @return element was found and removed
120 */
121 bool Remove(TileIndex tile, Tdir dir)
122 {
123 for (uint i = 0; i < this->n; i++) {
124 if (this->data[i].tile == tile && this->data[i].dir == dir) {
125 this->data[i] = this->data[--this->n];
126 return true;
127 }
128 }
129
130 return false;
131 }
132
133 /**
134 * Tries to find given tile and dir in the set

Callers 1

CheckAddToTodoSetFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected