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

Method GetClassIndex

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

Source from the content-addressed store, hash-verified

109 explicit PickerCallbacksNewGRFClass(const std::string &ini_group) : PickerCallbacks(ini_group) {}
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

Callers 8

GetClassMethod · 0.95
SetSelectedClassMethod · 0.80
DrawTypeMethod · 0.80
SetSelectedClassMethod · 0.80
DrawTypeMethod · 0.80
SetSelectedClassMethod · 0.80
SetSelectedClassMethod · 0.80
SetSelectedClassMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected