Codechange: Remove macros involved with NewGRFClass. (#12363)
Use direct class instantiation instead.
This commit is contained in:
@@ -136,20 +136,21 @@ void ResetObjects()
|
||||
_object_specs[OBJECT_TRANSMITTER].cls_id = ObjectClass::Allocate('TRNS');
|
||||
}
|
||||
|
||||
template <typename Tspec, typename Tid, Tid Tmax>
|
||||
/* static */ void NewGRFClass<Tspec, Tid, Tmax>::InsertDefaults()
|
||||
template <>
|
||||
/* static */ void ObjectClass::InsertDefaults()
|
||||
{
|
||||
ObjectClass::Get(ObjectClass::Allocate('LTHS'))->name = STR_OBJECT_CLASS_LTHS;
|
||||
ObjectClass::Get(ObjectClass::Allocate('TRNS'))->name = STR_OBJECT_CLASS_TRNS;
|
||||
}
|
||||
|
||||
template <typename Tspec, typename Tid, Tid Tmax>
|
||||
bool NewGRFClass<Tspec, Tid, Tmax>::IsUIAvailable(uint index) const
|
||||
template <>
|
||||
bool ObjectClass::IsUIAvailable(uint index) const
|
||||
{
|
||||
return this->GetSpec(index)->IsEverAvailable();
|
||||
}
|
||||
|
||||
INSTANTIATE_NEWGRF_CLASS_METHODS(ObjectClass, ObjectSpec, ObjectClassID, OBJECT_CLASS_MAX)
|
||||
/* Instantiate ObjectClass. */
|
||||
template class NewGRFClass<ObjectSpec, ObjectClassID, OBJECT_CLASS_MAX>;
|
||||
|
||||
/* virtual */ uint32_t ObjectScopeResolver::GetRandomBits() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user