summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pstate.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2016-05-31 23:49:55 +0200
committer couriersud <couriersud@arcor.de>2016-06-07 21:44:15 +0200
commit81880659d23b36598f498e32f24fd6a4cecbd80b (patch)
treed7cd226d8335ba06fab273b1616231881ecfe766 /src/lib/netlist/plib/pstate.cpp
parent3d3f5761f0b0419581762f72ea0984e047d3e55c (diff)
- More code cleanup.
- Dead code removal and minor refactoring. - Simplify. Align naming with stl. Fix somed pedantic warnings. - More STL compatability. - Remove ATTR_HOT and ATTR_COLD. Refactored netlist_time. - Fix long standing workaround which would ignore policy of change-only" propagation. - Rewrote for loops to use auto : semantics. - Truthtable cleanup. (nw) - Get rid of nl_math. Remove nl_util.h and moved contents to plib/putil.h. - Fix standalone build. Refactor ptypes.h. [Couriersud]
Diffstat (limited to 'src/lib/netlist/plib/pstate.cpp')
-rw-r--r--src/lib/netlist/plib/pstate.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/netlist/plib/pstate.cpp b/src/lib/netlist/plib/pstate.cpp
index bd16ee172e2..c8c4c5725c6 100644
--- a/src/lib/netlist/plib/pstate.cpp
+++ b/src/lib/netlist/plib/pstate.cpp
@@ -20,7 +20,7 @@ pstate_manager_t::~pstate_manager_t()
-ATTR_COLD void pstate_manager_t::save_state_ptr(const pstring &stname, const pstate_data_type_e dt, const void *owner, const int size, const int count, void *ptr, bool is_ptr)
+void pstate_manager_t::save_state_ptr(const void *owner, const pstring &stname, const pstate_data_type_e dt, const int size, const int count, void *ptr, bool is_ptr)
{
pstring fullname = stname;
ATTR_UNUSED pstring ts[] = {
@@ -42,7 +42,7 @@ ATTR_COLD void pstate_manager_t::save_state_ptr(const pstring &stname, const pst
m_save.push_back(std::move(p));
}
-ATTR_COLD void pstate_manager_t::remove_save_items(const void *owner)
+void pstate_manager_t::remove_save_items(const void *owner)
{
unsigned i = 0;
while (i < m_save.size())
@@ -54,21 +54,21 @@ ATTR_COLD void pstate_manager_t::remove_save_items(const void *owner)
}
}
-ATTR_COLD void pstate_manager_t::pre_save()
+void pstate_manager_t::pre_save()
{
- for (std::size_t i=0; i < m_save.size(); i++)
- if (m_save[i]->m_dt == DT_CUSTOM)
- m_save[i]->m_callback->on_pre_save();
+ for (auto & s : m_save)
+ if (s->m_dt == DT_CUSTOM)
+ s->m_callback->on_pre_save();
}
-ATTR_COLD void pstate_manager_t::post_load()
+void pstate_manager_t::post_load()
{
- for (std::size_t i=0; i < m_save.size(); i++)
- if (m_save[i]->m_dt == DT_CUSTOM)
- m_save[i]->m_callback->on_post_load();
+ for (auto & s : m_save)
+ if (s->m_dt == DT_CUSTOM)
+ s->m_callback->on_post_load();
}
-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)
{
//save_state_ptr(stname, DT_CUSTOM, 0, 1, &state);
pstate_callback_t *state_p = &state;