summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/te7750.h
diff options
context:
space:
mode:
author wilbertpol <wilbertpol@users.noreply.github.com>2018-03-03 18:18:08 +0100
committer Vas Crabb <cuavas@users.noreply.github.com>2018-03-04 04:18:08 +1100
commit3b923d59ccb8d2d8e386392518450006f8e644fe (patch)
tree73c48568e76d69edbde9f96a3f57d173dd05a747 /src/devices/machine/te7750.h
parent25472091b626bd01ef47f11389a4b2ebe0fc0008 (diff)
destaticify initializations (nw) (#3289)
* destaticify initializations (nw) * fix this->set_screen (nw)
Diffstat (limited to 'src/devices/machine/te7750.h')
-rw-r--r--src/devices/machine/te7750.h55
1 files changed, 26 insertions, 29 deletions
diff --git a/src/devices/machine/te7750.h b/src/devices/machine/te7750.h
index caf8bd1d464..8f3cc234060 100644
--- a/src/devices/machine/te7750.h
+++ b/src/devices/machine/te7750.h
@@ -16,45 +16,45 @@
//**************************************************************************
#define MCFG_TE7750_IN_PORT1_CB(_devcb) \
- devcb = &te7750_device::set_input_cb(*device, 0, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_input_cb(0, DEVCB_##_devcb);
#define MCFG_TE7750_IN_PORT2_CB(_devcb) \
- devcb = &te7750_device::set_input_cb(*device, 1, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_input_cb(1, DEVCB_##_devcb);
#define MCFG_TE7750_IN_PORT3_CB(_devcb) \
- devcb = &te7750_device::set_input_cb(*device, 2, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_input_cb(2, DEVCB_##_devcb);
#define MCFG_TE7750_IN_PORT4_CB(_devcb) \
- devcb = &te7750_device::set_input_cb(*device, 3, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_input_cb(3, DEVCB_##_devcb);
#define MCFG_TE7750_IN_PORT5_CB(_devcb) \
- devcb = &te7750_device::set_input_cb(*device, 4, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_input_cb(4, DEVCB_##_devcb);
#define MCFG_TE7750_IN_PORT6_CB(_devcb) \
- devcb = &te7750_device::set_input_cb(*device, 5, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_input_cb(5, DEVCB_##_devcb);
#define MCFG_TE7750_IN_PORT7_CB(_devcb) \
- devcb = &te7750_device::set_input_cb(*device, 6, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_input_cb(6, DEVCB_##_devcb);
#define MCFG_TE7750_IN_PORT8_CB(_devcb) \
- devcb = &te7750_device::set_input_cb(*device, 7, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_input_cb(7, DEVCB_##_devcb);
#define MCFG_TE7750_IN_PORT9_CB(_devcb) \
- devcb = &te7750_device::set_input_cb(*device, 8, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_input_cb(8, DEVCB_##_devcb);
#define MCFG_TE7750_OUT_PORT1_CB(_devcb) \
- devcb = &te7750_device::set_output_cb(*device, 0, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_output_cb(0, DEVCB_##_devcb);
#define MCFG_TE7750_OUT_PORT2_CB(_devcb) \
- devcb = &te7750_device::set_output_cb(*device, 1, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_output_cb(1, DEVCB_##_devcb);
#define MCFG_TE7750_OUT_PORT3_CB(_devcb) \
- devcb = &te7750_device::set_output_cb(*device, 2, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_output_cb(2, DEVCB_##_devcb);
#define MCFG_TE7750_OUT_PORT4_CB(_devcb) \
- devcb = &te7750_device::set_output_cb(*device, 3, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_output_cb(3, DEVCB_##_devcb);
#define MCFG_TE7750_OUT_PORT5_CB(_devcb) \
- devcb = &te7750_device::set_output_cb(*device, 4, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_output_cb(4, DEVCB_##_devcb);
#define MCFG_TE7750_OUT_PORT6_CB(_devcb) \
- devcb = &te7750_device::set_output_cb(*device, 5, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_output_cb(5, DEVCB_##_devcb);
#define MCFG_TE7750_OUT_PORT7_CB(_devcb) \
- devcb = &te7750_device::set_output_cb(*device, 6, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_output_cb(6, DEVCB_##_devcb);
#define MCFG_TE7750_OUT_PORT8_CB(_devcb) \
- devcb = &te7750_device::set_output_cb(*device, 7, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_output_cb(7, DEVCB_##_devcb);
#define MCFG_TE7750_OUT_PORT9_CB(_devcb) \
- devcb = &te7750_device::set_output_cb(*device, 8, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_output_cb(8, DEVCB_##_devcb);
#define MCFG_TE7750_IOS_CB(_devcb) \
- devcb = &te7750_device::set_ios_cb(*device, DEVCB_##_devcb);
+ devcb = &downcast<te7750_device &>(*device).set_ios_cb(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
@@ -68,23 +68,20 @@ public:
// construction/destruction
te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- // static configuration
- template<class Object>
- static devcb_base &set_input_cb(device_t &device, int port, Object &&obj)
+ // configuration
+ template<class Object> devcb_base &set_input_cb(int port, Object &&obj)
{
assert(port >= 0 && port < 9);
- return downcast<te7750_device &>(device).m_input_cb[port].set_callback(std::forward<Object>(obj));
+ return m_input_cb[port].set_callback(std::forward<Object>(obj));
}
- template<class Object>
- static devcb_base &set_output_cb(device_t &device, int port, Object &&obj)
+ template<class Object> devcb_base &set_output_cb(int port, Object &&obj)
{
assert(port >= 0 && port < 9);
- return downcast<te7750_device &>(device).m_output_cb[port].set_callback(std::forward<Object>(obj));
+ return m_output_cb[port].set_callback(std::forward<Object>(obj));
}
- template<class Object>
- static devcb_base &set_ios_cb(device_t &device, Object &&obj)
+ template<class Object> devcb_base &set_ios_cb(Object &&obj)
{
- return downcast<te7750_device &>(device).m_ios_cb.set_callback(std::forward<Object>(obj));
+ return m_ios_cb.set_callback(std::forward<Object>(obj));
}
// bus-compatible interface