MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / BuildListManual

Function BuildListManual

test/tests/TileElementsView.cpp:69–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68template<typename T>
69std::vector<T*> BuildListManual(const CoordsXY& pos)
70{
71 std::vector<T*> res;
72
73 TileElement* element = MapGetFirstElementAt(pos);
74 if (element == nullptr)
75 return res;
76
77 do
78 {
79 if constexpr (!std::is_same_v<T, TileElement>)
80 {
81 auto* el = element->as<T>();
82 if (el)
83 res.push_back(el);
84 }
85 else
86 {
87 res.push_back(element);
88 }
89
90 } while (!(element++)->isLastForTile());
91
92 return res;
93}
94
95template<typename T>
96std::vector<T*> BuildListByView(const CoordsXY& pos)

Callers

nothing calls this directly

Calls 3

MapGetFirstElementAtFunction · 0.85
push_backMethod · 0.45
isLastForTileMethod · 0.45

Tested by

no test coverage detected