mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-24 21:08:34 +01:00
Codechange: Allow SmallStack Titem type to be non-structural
This commit is contained in:
parent
2cdd50f40e
commit
cbdd358ae8
@ -113,13 +113,14 @@ struct SmallStackItem {
|
||||
* index types of the same length.
|
||||
* @tparam Titem Value type to be used.
|
||||
* @tparam Tindex Index type to use for the pool.
|
||||
* @tparam Tinvalid Invalid item to keep at the bottom of each stack.
|
||||
* @tparam Tinvalid_value Value to construct invalid item to keep at the bottom of each stack.
|
||||
* @tparam Tgrowth_step Growth step for pool.
|
||||
* @tparam Tmax_size Maximum size for pool.
|
||||
*/
|
||||
template <typename Titem, typename Tindex, Titem Tinvalid, Tindex Tgrowth_step, Tindex Tmax_size>
|
||||
template <typename Titem, typename Tindex, auto Tinvalid_value, Tindex Tgrowth_step, Tindex Tmax_size>
|
||||
class SmallStack : public SmallStackItem<Titem, Tindex> {
|
||||
public:
|
||||
static constexpr Titem Tinvalid{Tinvalid_value};
|
||||
|
||||
typedef SmallStackItem<Titem, Tindex> Item;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user