diff options
author | 2023-06-17 01:10:05 +1000 | |
---|---|---|
committer | 2023-06-17 01:10:05 +1000 | |
commit | e9c1f4a42a6758a6fb75403e28c7dc6cf869081c (patch) | |
tree | 8e0b6d960bed4baec2408c9ab950218592ef33ec /src/devices/machine/74148.cpp | |
parent | c1ceb6e016763537c5109cc76fe5d1b4ae72fdb3 (diff) |
emu/devcb.h: Eliminated the need to call resolve() on callbacks. (#11333)
Read callbacks now need a default return value supplied at construction.
Replaced isnull() with isunset() which tells you if the callback wasn't
configured rather than whether it isn't safe to call.
Enabled validation of device callbacks (it seems it was disabled at some
point, probably accidentally).
Device callbacks and object finders now implement the same interface for
resolution.
Diffstat (limited to 'src/devices/machine/74148.cpp')
-rw-r--r-- | src/devices/machine/74148.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/devices/machine/74148.cpp b/src/devices/machine/74148.cpp index 61097815db3..44b62d95bc9 100644 --- a/src/devices/machine/74148.cpp +++ b/src/devices/machine/74148.cpp @@ -68,8 +68,6 @@ ttl74148_device::ttl74148_device(const machine_config &mconfig, const char *tag, void ttl74148_device::device_start() { - m_output_cb.resolve_safe(); - save_item(NAME(m_input_lines)); save_item(NAME(m_enable_input)); save_item(NAME(m_output)); @@ -157,9 +155,8 @@ void ttl74148_device::update() /* call callback if any of the outputs changed */ - if (!m_output_cb.isnull() && - ((m_output != m_last_output) || - (m_output_valid != m_last_output_valid) || (m_enable_output != m_last_enable_output))) + if ((m_output != m_last_output) || + (m_output_valid != m_last_output_valid) || (m_enable_output != m_last_enable_output)) { m_last_output = m_output; m_last_output_valid = m_output_valid; |