mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 01:12:39 +01:00
Codechange: introduce ConvertibleThroughBase helpers
This commit is contained in:
@@ -73,6 +73,8 @@ static inline uint GetInspectWindowNumber(GrfSpecFeature feature, uint index)
|
||||
return (feature << 24) | index;
|
||||
}
|
||||
|
||||
static inline uint GetInspectWindowNumber(GrfSpecFeature feature, ConvertibleThroughBase auto index) { return GetInspectWindowNumber(feature, index.base()); }
|
||||
|
||||
/**
|
||||
* The type of a property to show. This is used to
|
||||
* provide an appropriate representation in the GUI.
|
||||
@@ -226,6 +228,11 @@ protected:
|
||||
SetDParam(2, index);
|
||||
SetDParam(3, tile);
|
||||
}
|
||||
|
||||
void SetObjectAtStringParameters(StringID string, ConvertibleThroughBase auto index, TileIndex tile) const
|
||||
{
|
||||
this->SetObjectAtStringParameters(string, index.base(), tile);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user