diff options
author | 2019-09-20 00:28:19 +1000 | |
---|---|---|
committer | 2019-09-20 00:28:19 +1000 | |
commit | dac7094f3431b8f933497b0c7693e6baeb1bb75c (patch) | |
tree | 1c3dc049110c54d23dc31a1e6c1e8b11fd24e299 /src/devices/machine/ds2404.cpp | |
parent | cc25024f791747fa17c1f06bd81c482a86aac91b (diff) |
(nw) misc cleanup:
* get rid of most assert_always
* get rid of a few MCFG_*_OVERRIDE
Diffstat (limited to 'src/devices/machine/ds2404.cpp')
-rw-r--r-- | src/devices/machine/ds2404.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/devices/machine/ds2404.cpp b/src/devices/machine/ds2404.cpp index 4a28b7f7d38..4f92a844a45 100644 --- a/src/devices/machine/ds2404.cpp +++ b/src/devices/machine/ds2404.cpp @@ -10,7 +10,9 @@ #include "emu.h" #include "ds2404.h" -#include <time.h> + +#include <algorithm> +#include <time.h> // FIXME: re-write in terms of device_rtc_interface and remove this //************************************************************************** @@ -34,7 +36,7 @@ ds2404_device::ds2404_device(const machine_config &mconfig, const char *tag, dev m_a2(0), m_state_ptr(0) { - memset(m_ram, 0, sizeof(m_ram)); + std::fill(std::begin(m_ram), std::end(m_ram), 0); } @@ -315,23 +317,17 @@ void ds2404_device::device_timer(emu_timer &timer, device_timer_id id, int param switch(id) { case 0: - { // tick - for(auto & elem : m_rtc) + for(auto &elem : m_rtc) { elem++; if(elem != 0) - { break; - } } - break; - } default: - assert_always(false, "Unknown id in ds2404_device::device_timer"); - break; + throw emu_fatalerror("Unknown id in ds2404_device::device_timer"); } } |