summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/ym3802.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/ym3802.h')
-rw-r--r--src/devices/machine/ym3802.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/machine/ym3802.h b/src/devices/machine/ym3802.h
index 30c9bde478b..4f58b19ac7a 100644
--- a/src/devices/machine/ym3802.h
+++ b/src/devices/machine/ym3802.h
@@ -23,10 +23,10 @@
#include <queue>
#define MCFG_YM3802_IRQ_HANDLER(_devcb) \
- devcb = &ym3802_device::set_irq_handler(*device, DEVCB_##_devcb);
+ devcb = &downcast<ym3802_device &>(*device).set_irq_handler(DEVCB_##_devcb);
#define MCFG_YM3802_TXD_HANDLER(_devcb) \
- devcb = &ym3802_device::set_txd_handler(*device, DEVCB_##_devcb);
+ devcb = &downcast<ym3802_device &>(*device).set_txd_handler(DEVCB_##_devcb);
class ym3802_device : public device_t, public device_serial_interface
{
@@ -34,9 +34,9 @@ public:
// construction/destruction
ym3802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration helpers
- template <class Object> static devcb_base &set_irq_handler(device_t &device, Object &&cb) { return downcast<ym3802_device &>(device).m_irq_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> static devcb_base &set_txd_handler(device_t &device, Object &&cb) { return downcast<ym3802_device &>(device).m_txd_handler.set_callback(std::forward<Object>(cb)); }
+ // configuration helpers
+ template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_txd_handler(Object &&cb) { return m_txd_handler.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);