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

Method UpdateListPos

src/network/network_gui.cpp:326–334  ·  view source on GitHub ↗

Set this->list_pos to match this->server */

Source from the content-addressed store, hash-verified

324
325 /** Set this->list_pos to match this->server */
326 void UpdateListPos()
327 {
328 auto it = std::ranges::find(this->servers, this->server);
329 if (it == std::end(this->servers)) {
330 this->list_pos = SLP_INVALID;
331 } else {
332 this->list_pos = static_cast<ServerListPosition>(std::distance(std::begin(this->servers), it));
333 }
334 }
335
336 static bool NGameSearchFilter(NetworkGame * const *item, StringFilter &sf)
337 {

Callers 3

SortNetworkGameListMethod · 0.95
OnClickMethod · 0.95

Calls 3

findFunction · 0.50
endFunction · 0.50
beginFunction · 0.50

Tested by

no test coverage detected