mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Allow SmallStack Titem type to be non-structural
parent
7bb4940ebd
commit
0718124de8
|
@ -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