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

Method GetClass

src/picker_gui.h:112–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110
111 inline typename T::index_type GetClassIndex(int cls_id) const { return static_cast<typename T::index_type>(cls_id); }
112 inline const T *GetClass(int cls_id) const { return T::Get(this->GetClassIndex(cls_id)); }
113 inline const typename T::spec_type *GetSpec(int cls_id, int id) const { return this->GetClass(cls_id)->GetSpec(id); }
114
115 bool HasClassChoice() const override { return T::GetUIClassCount() > 1; }

Callers 4

GetSpecMethod · 0.95
GetTypeCountMethod · 0.95
GetClassNameMethod · 0.80
GetClassNameMethod · 0.80

Calls 1

GetClassIndexMethod · 0.95

Tested by

no test coverage detected