From 601034c8d71b64262b257e47797f3a315ed16fcb Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 5 Feb 2020 12:41:58 +1100 Subject: devcb.cpp: syntactic sugar for constructing/resolving arrays of callbacks (nw) Saves a lot of typing { *this }, { *this }... Could be applied in more places, I just did a few devices to demonstrate it. --- src/devices/sound/huc6230.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/devices/sound/huc6230.cpp') diff --git a/src/devices/sound/huc6230.cpp b/src/devices/sound/huc6230.cpp index 5537f3ffea6..57e3b77ab26 100644 --- a/src/devices/sound/huc6230.cpp +++ b/src/devices/sound/huc6230.cpp @@ -147,7 +147,7 @@ huc6230_device::huc6230_device(const machine_config &mconfig, const char *tag, d , m_adpcm_freq(0) , m_pcm_lvol(0) , m_pcm_rvol(0) - , m_adpcm_update_cb{{*this}, {*this}} + , m_adpcm_update_cb(*this) , m_vca_cb(*this) { } @@ -168,8 +168,7 @@ void huc6230_device::device_add_mconfig(machine_config &config) void huc6230_device::device_start() { - for (auto &cb : m_adpcm_update_cb) - cb.resolve_safe(0); + m_adpcm_update_cb.resolve_all_safe(0); m_vca_cb.resolve_safe(); -- cgit v1.2.3