diff options
Diffstat (limited to 'src/lib/netlist/plib/pstate.h')
-rw-r--r-- | src/lib/netlist/plib/pstate.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/netlist/plib/pstate.h b/src/lib/netlist/plib/pstate.h index 19dbc03bc46..9fdd78a4263 100644 --- a/src/lib/netlist/plib/pstate.h +++ b/src/lib/netlist/plib/pstate.h @@ -11,6 +11,7 @@ #include "pstring.h" #include "ptypes.h" +#include <array> #include <memory> #include <vector> @@ -90,7 +91,7 @@ public: } template<typename C, std::size_t N> - void save_item(const void *owner, C (&state)[N], const pstring &stname) + void save_item(const void *owner, C (&state)[N], const pstring &stname) // NOLINT(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays) { save_state_ptr(owner, stname, dtype<C>(), N, &(state[0])); } @@ -107,6 +108,12 @@ public: save_state_ptr(owner, stname, dtype<C>(), v.size(), v.data()); } + template<typename C, std::size_t N> + void save_item(const void *owner, std::array<C, N> &a, const pstring &stname) + { + save_state_ptr(owner, stname, dtype<C>(), N, a.data()); + } + void pre_save(); void post_load(); void remove_save_items(const void *owner); |