diff options
author | Vas Crabb <vas@vastheman.com> | 2018-06-17 01:50:47 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2018-06-17 01:50:47 +1000 |
commit | b0d19b944db2b37b52ea7a636c98b2010c996a81 (patch) | |
tree | 42c1dfd2a8148f2d2ec45100083484dfcfda0717 /src/devices/bus/pet/user.h | |
parent | 67fd77d2442fc4f1b22829171f4642df5b59a623 (diff) |
more macro removal and overload disambiguation (nw)
Diffstat (limited to 'src/devices/bus/pet/user.h')
-rw-r--r-- | src/devices/bus/pet/user.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/devices/bus/pet/user.h b/src/devices/bus/pet/user.h index d7753ad23f1..651e121a2fa 100644 --- a/src/devices/bus/pet/user.h +++ b/src/devices/bus/pet/user.h @@ -27,11 +27,6 @@ #pragma once - -#define MCFG_PET_USER_PORT_ADD(_tag, _slot_intf, _def_slot) \ - MCFG_DEVICE_ADD(_tag, PET_USER_PORT, 0) \ - MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) - #define MCFG_PET_USER_PORT_2_HANDLER(_devcb) \ devcb = &downcast<pet_user_port_device &>(*device).set_2_handler(DEVCB_##_devcb); @@ -100,6 +95,15 @@ class pet_user_port_device : public device_t, friend class device_pet_user_port_interface; public: + template <typename T> + pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) + : pet_user_port_device(mconfig, tag, owner, 0) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(false); + } pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template <class Object> devcb_base &set_2_handler(Object &&cb) { return m_2_handler.set_callback(std::forward<Object>(cb)); } |