summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/315-5881_crypt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/315-5881_crypt.h')
-rw-r--r--src/mame/machine/315-5881_crypt.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mame/machine/315-5881_crypt.h b/src/mame/machine/315-5881_crypt.h
index 62c0de16e9a..a0929ac7201 100644
--- a/src/mame/machine/315-5881_crypt.h
+++ b/src/mame/machine/315-5881_crypt.h
@@ -11,7 +11,7 @@ typedef device_delegate<uint16_t (uint32_t)> sega_m2_read_delegate;
DECLARE_DEVICE_TYPE(SEGA315_5881_CRYPT, sega_315_5881_crypt_device)
#define MCFG_SET_READ_CALLBACK( _class, _method) \
- sega_315_5881_crypt_device::set_read_cb(*device, sega_m2_read_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
+ downcast<sega_315_5881_crypt_device &>(*device).set_read_cb(sega_m2_read_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
class sega_315_5881_crypt_device : public device_t
@@ -28,10 +28,9 @@ public:
sega_m2_read_delegate m_read;
- static void set_read_cb(device_t &device,sega_m2_read_delegate readcb)
+ void set_read_cb(sega_m2_read_delegate readcb)
{
- sega_315_5881_crypt_device &dev = downcast<sega_315_5881_crypt_device &>(device);
- dev.m_read = readcb;
+ m_read = readcb;
}
protected: