diff options
Diffstat (limited to 'src/devices/machine/rp5c01.h')
-rw-r--r-- | src/devices/machine/rp5c01.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/machine/rp5c01.h b/src/devices/machine/rp5c01.h index 247c6157ad0..6c0cf00050b 100644 --- a/src/devices/machine/rp5c01.h +++ b/src/devices/machine/rp5c01.h @@ -32,11 +32,11 @@ //************************************************************************** #define MCFG_RP5C01_OUT_ALARM_CB(_devcb) \ - devcb = &rp5c01_device::set_out_alarm_callback(*device, DEVCB_##_devcb); + devcb = &downcast<rp5c01_device &>(*device).set_out_alarm_callback(DEVCB_##_devcb); // include this macro if the chip is not battery backed #define MCFG_RP5C01_REMOVE_BATTERY() \ - rp5c01_device::remove_battery(*device); + downcast<rp5c01_device &>(*device).remove_battery(); //************************************************************************** @@ -53,8 +53,8 @@ public: // construction/destruction rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template <class Object> static devcb_base &set_out_alarm_callback(device_t &device, Object &&cb) { return downcast<rp5c01_device &>(device).m_out_alarm_cb.set_callback(std::forward<Object>(cb)); } - static void remove_battery(device_t &device) { downcast<rp5c01_device &>(device).m_battery_backed = false; } + template <class Object> devcb_base &set_out_alarm_callback(Object &&cb) { return m_out_alarm_cb.set_callback(std::forward<Object>(cb)); } + void remove_battery() { m_battery_backed = false; } DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); |