diff --git a/src/devices/bus/intellec4/intellec4.h b/src/devices/bus/intellec4/intellec4.h index b88cc3d57ed..cfcec3ee372 100644 --- a/src/devices/bus/intellec4/intellec4.h +++ b/src/devices/bus/intellec4/intellec4.h @@ -115,40 +115,40 @@ to implement the card in both systems. #define MCFG_INTELLEC4_UNIV_SLOT_ADD(bus_tag, slot_tag, clock, slot_intf, def_slot) \ - MCFG_DEVICE_ADD(slot_tag, INTELLEC4_UNIV_SLOT, clock) \ - MCFG_DEVICE_SLOT_INTERFACE(slot_intf, def_slot, false) \ - downcast(*device).set_bus_tag("^" bus_tag); + MCFG_DEVICE_ADD(slot_tag, INTELLEC4_UNIV_SLOT, clock) \ + MCFG_DEVICE_SLOT_INTERFACE(slot_intf, def_slot, false) \ + downcast(*device).set_bus_tag("^" bus_tag); #define MCFG_INTELLEC4_UNIV_SLOT_REMOVE(slot_tag) \ - MCFG_DEVICE_REMOVE(slot_tag) + MCFG_DEVICE_REMOVE(slot_tag) #define MCFG_INTELLEC4_UNIV_BUS_ROM_SPACE(tag, space) \ - downcast(*device).set_rom_space("^" tag, space); + downcast(*device).set_rom_space("^" tag, space); #define MCFG_INTELLEC4_UNIV_BUS_ROM_PORTS_SPACE(tag, space) \ - downcast(*device).set_rom_ports_space("^" tag, space); + downcast(*device).set_rom_ports_space("^" tag, space); #define MCFG_INTELLEC4_UNIV_BUS_MEMORY_SPACE(tag, space) \ - downcast(*device).set_memory_space("^" tag, space); + downcast(*device).set_memory_space("^" tag, space); #define MCFG_INTELLEC4_UNIV_BUS_STATUS_SPACE(tag, space) \ - downcast(*device).set_status_space("^" tag, space); + downcast(*device).set_status_space("^" tag, space); #define MCFG_INTELLEC4_UNIV_BUS_RAM_PORTS_SPACE(tag, space) \ - downcast(*device).set_ram_ports_space("^" tag, space); + downcast(*device).set_ram_ports_space("^" tag, space); #define MCFG_INTELLEC4_UNIV_BUS_TEST_CB(obj) \ - downcast(*device).set_test_out_cb(DEVCB_##obj); + downcast(*device).set_test_out_cb(DEVCB_##obj); #define MCFG_INTELLEC4_UNIV_BUS_STOP_CB(obj) \ - downcast(*device).set_stop_out_cb(DEVCB_##obj); + downcast(*device).set_stop_out_cb(DEVCB_##obj); #define MCFG_INTELLEC4_UNIV_BUS_RESET_4002_CB(obj) \ - downcast(*device).set_reset_4002_out_cb(DEVCB_##obj); + downcast(*device).set_reset_4002_out_cb(DEVCB_##obj); #define MCFG_INTELLEC4_UNIV_BUS_USER_RESET_CB(obj) \ - downcast(*device).set_user_reset_out_cb(DEVCB_##obj); + downcast(*device).set_user_reset_out_cb(DEVCB_##obj); namespace bus { namespace intellec4 { diff --git a/src/devices/machine/6532riot.h b/src/devices/machine/6532riot.h index a4b7d5b2608..f51aa8766f5 100644 --- a/src/devices/machine/6532riot.h +++ b/src/devices/machine/6532riot.h @@ -46,11 +46,11 @@ public: // construction/destruction riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template devcb_base &set_in_pa_callback(_Object object) { return m_in_pa_cb.set_callback(object); } - template devcb_base &set_out_pa_callback(_Object object) { return m_out_pa_cb.set_callback(object); } - template devcb_base &set_in_pb_callback(_Object object) { return m_in_pb_cb.set_callback(object); } - template devcb_base &set_out_pb_callback(_Object object) { return m_out_pb_cb.set_callback(object); } - template devcb_base &set_irq_callback(_Object object) { return m_irq_cb.set_callback(object); } + template devcb_base &set_in_pa_callback(Object &&cb) { return m_in_pa_cb.set_callback(std::forward(cb)); } + template devcb_base &set_out_pa_callback(Object &&cb) { return m_out_pa_cb.set_callback(std::forward(cb)); } + template devcb_base &set_in_pb_callback(Object &&cb) { return m_in_pb_cb.set_callback(std::forward(cb)); } + template devcb_base &set_out_pb_callback(Object &&cb) { return m_out_pb_cb.set_callback(std::forward(cb)); } + template devcb_base &set_irq_callback(Object &&cb) { return m_irq_cb.set_callback(std::forward(cb)); } DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); diff --git a/src/devices/machine/pla.h b/src/devices/machine/pla.h index a0272117613..94d7a178ea6 100644 --- a/src/devices/machine/pla.h +++ b/src/devices/machine/pla.h @@ -19,16 +19,16 @@ ///************************************************************************* #define MCFG_PLA_ADD(tag, inputs, outputs, terms) \ - MCFG_DEVICE_ADD((tag), PLA, 0) \ - downcast(*device).set_num_inputs((inputs)); \ - downcast(*device).set_num_outputs((outputs)); \ - downcast(*device).set_num_terms((terms)); + MCFG_DEVICE_ADD((tag), PLA, 0) \ + downcast(*device).set_num_inputs((inputs)); \ + downcast(*device).set_num_outputs((outputs)); \ + downcast(*device).set_num_terms((terms)); #define MCFG_PLA_INPUTMASK(mask) \ - downcast(*device).set_inputmask((mask)); + downcast(*device).set_inputmask((mask)); #define MCFG_PLA_FILEFORMAT(format) \ - downcast(*device).set_format((pla_device::FMT::format)); + downcast(*device).set_format((pla_device::FMT::format)); // macros for known (and used) devices diff --git a/src/devices/machine/r10788.h b/src/devices/machine/r10788.h index 5899e1c203a..1a8f4b13af8 100644 --- a/src/devices/machine/r10788.h +++ b/src/devices/machine/r10788.h @@ -27,7 +27,7 @@ /* Set the writer used to update a display digit */ #define MCFG_R10788_UPDATE(devcb) \ - downcast(*device).set_update(DEVCB_##devcb); + downcast(*device).set_update(DEVCB_##devcb); class r10788_device : public device_t { diff --git a/src/devices/machine/tmc0430.h b/src/devices/machine/tmc0430.h index 2f4e54df7cf..e7288c8f7bc 100644 --- a/src/devices/machine/tmc0430.h +++ b/src/devices/machine/tmc0430.h @@ -109,8 +109,8 @@ private: }; #define MCFG_GROM_ADD(_tag, _ident, _region, _offset, _ready) \ - MCFG_DEVICE_ADD(_tag, TMC0430, 0) \ - downcast(*device).set_region_and_ident(_region, _offset, _ident); \ - downcast(*device).set_ready_wr_callback(DEVCB_##_ready); + MCFG_DEVICE_ADD(_tag, TMC0430, 0) \ + downcast(*device).set_region_and_ident(_region, _offset, _ident); \ + downcast(*device).set_ready_wr_callback(DEVCB_##_ready); #endif // MAME_MACHINE_TMC0430_H diff --git a/src/mame/machine/teleprinter.h b/src/mame/machine/teleprinter.h index 2c6948de5e7..f33090399b4 100644 --- a/src/mame/machine/teleprinter.h +++ b/src/mame/machine/teleprinter.h @@ -15,7 +15,7 @@ #define TELEPRINTER_SCREEN_TAG "tty_screen" #define MCFG_GENERIC_TELEPRINTER_KEYBOARD_CB(cb) \ - downcast(*device).set_keyboard_callback(KEYBOARDCB_##cb); + downcast(*device).set_keyboard_callback(KEYBOARDCB_##cb); /*************************************************************************** FUNCTION PROTOTYPES