summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/k054539.h
diff options
context:
space:
mode:
author Wilbert Pol <wilbertpol@users.noreply.github.com>2018-02-25 17:40:06 +0100
committer Wilbert Pol <wilbertpol@users.noreply.github.com>2018-02-25 17:40:06 +0100
commit86f6ad0b5cd44799f8c2cfb9aad2727e32e9a4ce (patch)
treeed6d9dc25fb1f32a1894a98c916f3567b26f21b5 /src/devices/sound/k054539.h
parentf07b93b0532d379eb542ca507b103e71196e9147 (diff)
de-staticify initializations for src/devices/sound (nw)
Diffstat (limited to 'src/devices/sound/k054539.h')
-rw-r--r--src/devices/sound/k054539.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/sound/k054539.h b/src/devices/sound/k054539.h
index a57559c25a2..4b1d55cf534 100644
--- a/src/devices/sound/k054539.h
+++ b/src/devices/sound/k054539.h
@@ -14,13 +14,13 @@
#define K054539_CB_MEMBER(_name) void _name(double left, double right)
#define MCFG_K054539_APAN_CB(_class, _method) \
- k054539_device::set_analog_callback(*device, k054539_device::cb_delegate(&_class::_method, #_class "::" #_method, this));
+ downcast<k054539_device &>(*device).set_analog_callback(k054539_device::cb_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_K054539_REGION_OVERRRIDE(_region) \
- k054539_device::set_override(*device, "^" _region);
+ downcast<k054539_device &>(*device).set_override("^" _region);
#define MCFG_K054539_TIMER_HANDLER(_devcb) \
- devcb = &k054539_device::set_timer_handler(*device, DEVCB_##_devcb);
+ devcb = &downcast<k054539_device &>(*device).set_timer_handler(DEVCB_##_devcb);
class k054539_device : public device_t,
@@ -41,9 +41,9 @@ public:
// construction/destruction
k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration helpers
- static void set_analog_callback(device_t &device, cb_delegate &&cb) { downcast<k054539_device &>(device).m_apan_cb = std::move(cb); }
- template <class Object> static devcb_base &set_timer_handler(device_t &device, Object &&cb) { return downcast<k054539_device &>(device).m_timer_handler.set_callback(std::forward<Object>(cb)); }
+ // configuration helpers
+ template <typename Object> void set_analog_callback(Object &&cb) { m_apan_cb = std::forward<Object>(cb); }
+ template <class Object> devcb_base &set_timer_handler(Object &&cb) { return m_timer_handler.set_callback(std::forward<Object>(cb)); }
DECLARE_WRITE8_MEMBER(write);