summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pstate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/plib/pstate.h')
-rw-r--r--src/lib/netlist/plib/pstate.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/lib/netlist/plib/pstate.h b/src/lib/netlist/plib/pstate.h
index 846bad2cc68..12115678b3a 100644
--- a/src/lib/netlist/plib/pstate.h
+++ b/src/lib/netlist/plib/pstate.h
@@ -124,34 +124,34 @@ public:
pstate_manager_t();
~pstate_manager_t();
- template<typename C> ATTR_COLD void save_item(C &state, const void *owner, const pstring &stname)
+ template<typename C> void save_item(const void *owner, C &state, const pstring &stname)
{
- save_state_ptr(stname, pstate_datatype<C>::type, owner, sizeof(C), 1, &state, pstate_datatype<C>::is_ptr);
+ save_state_ptr( owner, stname, pstate_datatype<C>::type, sizeof(C), 1, &state, pstate_datatype<C>::is_ptr);
}
- template<typename C, std::size_t N> ATTR_COLD void save_item(C (&state)[N], const void *owner, const pstring &stname)
+ template<typename C, std::size_t N> void save_item(const void *owner, C (&state)[N], const pstring &stname)
{
- save_state_ptr(stname, pstate_datatype<C>::type, owner, sizeof(state[0]), N, &(state[0]), false);
+ save_state_ptr(owner, stname, pstate_datatype<C>::type, sizeof(state[0]), N, &(state[0]), false);
}
- template<typename C> ATTR_COLD void save_item(C *state, const void *owner, const pstring &stname, const int count)
+ template<typename C> void save_item(const void *owner, C *state, const pstring &stname, const int count)
{
- save_state_ptr(stname, pstate_datatype<C>::type, owner, sizeof(C), count, state, false);
+ save_state_ptr(owner, stname, pstate_datatype<C>::type, sizeof(C), count, state, false);
}
template<typename C>
- void save_item(std::vector<C> &v, const void *owner, const pstring &stname)
+ void save_item(const void *owner, std::vector<C> &v, const pstring &stname)
{
save_state(v.data(), owner, stname, v.size());
}
- ATTR_COLD void pre_save();
- ATTR_COLD void post_load();
- ATTR_COLD void remove_save_items(const void *owner);
+ void pre_save();
+ void post_load();
+ void remove_save_items(const void *owner);
const pstate_entry_t::list_t &save_list() const { return m_save; }
- ATTR_COLD void save_state_ptr(const pstring &stname, const pstate_data_type_e, const void *owner, const int size, const int count, void *ptr, bool is_ptr);
+ void save_state_ptr(const void *owner, const pstring &stname, const pstate_data_type_e, const int size, const int count, void *ptr, bool is_ptr);
protected:
@@ -159,7 +159,7 @@ private:
pstate_entry_t::list_t m_save;
};
-template<> ATTR_COLD void pstate_manager_t::save_item(pstate_callback_t &state, const void *owner, const pstring &stname);
+template<> void pstate_manager_t::save_item(const void *owner, pstate_callback_t &state, const pstring &stname);
template <typename T>
class pstate_interface_t
@@ -169,21 +169,21 @@ public:
template<typename C> void save(C &state, const pstring &stname)
{
- pstate_manager_t *manager = static_cast<T*>(this)->state_manager();
+ pstate_manager_t &manager = static_cast<T*>(this)->state_manager();
pstring module = static_cast<T*>(this)->name();
- manager->save_item(state, this, module + "." + stname);
+ manager.save_item(this, state, module + "." + stname);
}
- template<typename C, std::size_t N> ATTR_COLD void save(C (&state)[N], const pstring &stname)
+ template<typename C, std::size_t N> void save(C (&state)[N], const pstring &stname)
{
- pstate_manager_t *manager = static_cast<T*>(this)->state_manager();
+ pstate_manager_t &manager = static_cast<T*>(this)->state_manager();
pstring module = static_cast<T*>(this)->name();
- manager->save_state_ptr(module + "." + stname, pstate_datatype<C>::type, this, sizeof(state[0]), N, &(state[0]), false);
+ manager.save_state_ptr(this, module + "." + stname, pstate_datatype<C>::type, sizeof(state[0]), N, &(state[0]), false);
}
- template<typename C> ATTR_COLD void save(C *state, const pstring &stname, const int count)
+ template<typename C> void save(C *state, const pstring &stname, const int count)
{
- pstate_manager_t *manager = static_cast<T*>(this)->state_manager();
+ pstate_manager_t &manager = static_cast<T*>(this)->state_manager();
pstring module = static_cast<T*>(this)->name();
- manager->save_state_ptr(module + "." + stname, pstate_datatype<C>::type, this, sizeof(C), count, state, false);
+ manager.save_state_ptr(this, module + "." + stname, pstate_datatype<C>::type, sizeof(C), count, state, false);
}
};