From 253e7f1caeb36333d943cecffd6f985fdbad2a93 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 15 Nov 2020 13:43:36 +1100 Subject: [PATCH] Remove some deprecated instantiations of static constexpr members (MSVC complains about them now) --- src/devices/bus/sgikbd/sgikbd.cpp | 6 ------ src/devices/bus/sunkbd/sunkbd.cpp | 7 ------- src/devices/bus/sunmouse/sunmouse.cpp | 7 ------- src/emu/debug/dvdisasm.cpp | 3 --- src/emu/debug/dvstate.cpp | 7 ------- src/emu/rendlay.cpp | 7 ++++--- src/lib/util/hash.cpp | 8 ++------ 7 files changed, 6 insertions(+), 39 deletions(-) diff --git a/src/devices/bus/sgikbd/sgikbd.cpp b/src/devices/bus/sgikbd/sgikbd.cpp index 478a65243b5..80138f1d7a3 100644 --- a/src/devices/bus/sgikbd/sgikbd.cpp +++ b/src/devices/bus/sgikbd/sgikbd.cpp @@ -8,12 +8,6 @@ DEFINE_DEVICE_TYPE(SGIKBD_PORT, sgi_keyboard_port_device, "sgikbd", "SGI Keyboard Port") -int const device_sgi_keyboard_port_interface::START_BIT_COUNT; -int const device_sgi_keyboard_port_interface::DATA_BIT_COUNT; -device_serial_interface::parity_t const device_sgi_keyboard_port_interface::PARITY; -device_serial_interface::stop_bits_t const device_sgi_keyboard_port_interface::STOP_BITS; -int const device_sgi_keyboard_port_interface::BAUD; - sgi_keyboard_port_device::sgi_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) : sgi_keyboard_port_device(mconfig, SGIKBD_PORT, tag, owner, clock) { diff --git a/src/devices/bus/sunkbd/sunkbd.cpp b/src/devices/bus/sunkbd/sunkbd.cpp index 1d0b62df3fd..ee166b8b39f 100644 --- a/src/devices/bus/sunkbd/sunkbd.cpp +++ b/src/devices/bus/sunkbd/sunkbd.cpp @@ -95,13 +95,6 @@ DEFINE_DEVICE_TYPE(SUNKBD_PORT, sun_keyboard_port_device, "sunkbd", "Sun Keyboard Port") -int const device_sun_keyboard_port_interface::START_BIT_COUNT; -int const device_sun_keyboard_port_interface::DATA_BIT_COUNT; -device_serial_interface::parity_t const device_sun_keyboard_port_interface::PARITY; -device_serial_interface::stop_bits_t const device_sun_keyboard_port_interface::STOP_BITS; -int const device_sun_keyboard_port_interface::BAUD; - - sun_keyboard_port_device::sun_keyboard_port_device( machine_config const &mconfig, diff --git a/src/devices/bus/sunmouse/sunmouse.cpp b/src/devices/bus/sunmouse/sunmouse.cpp index 035a01cc7d7..4bd80279149 100644 --- a/src/devices/bus/sunmouse/sunmouse.cpp +++ b/src/devices/bus/sunmouse/sunmouse.cpp @@ -72,13 +72,6 @@ DEFINE_DEVICE_TYPE(SUNMOUSE_PORT, sun_mouse_port_device, "sunmouse", "Sun Mouse Port") -int const device_sun_mouse_port_interface::START_BIT_COUNT; -int const device_sun_mouse_port_interface::DATA_BIT_COUNT; -device_serial_interface::parity_t const device_sun_mouse_port_interface::PARITY; -device_serial_interface::stop_bits_t const device_sun_mouse_port_interface::STOP_BITS; -int const device_sun_mouse_port_interface::BAUD; - - sun_mouse_port_device::sun_mouse_port_device( machine_config const &mconfig, diff --git a/src/emu/debug/dvdisasm.cpp b/src/emu/debug/dvdisasm.cpp index ee8cd356a32..956b0bdc29b 100644 --- a/src/emu/debug/dvdisasm.cpp +++ b/src/emu/debug/dvdisasm.cpp @@ -35,9 +35,6 @@ debug_view_disasm_source::debug_view_disasm_source(std::string &&name, device_t // DEBUG VIEW DISASM //************************************************************************** -const int debug_view_disasm::DEFAULT_DASM_LINES, debug_view_disasm::DEFAULT_DASM_WIDTH, debug_view_disasm::DASM_MAX_BYTES; - - //------------------------------------------------- // debug_view_disasm - constructor //------------------------------------------------- diff --git a/src/emu/debug/dvstate.cpp b/src/emu/debug/dvstate.cpp index 594d8fdad39..e24550bf34f 100644 --- a/src/emu/debug/dvstate.cpp +++ b/src/emu/debug/dvstate.cpp @@ -16,13 +16,6 @@ #include "screen.h" -const int debug_view_state::REG_DIVIDER; -const int debug_view_state::REG_CYCLES; -const int debug_view_state::REG_BEAMX; -const int debug_view_state::REG_BEAMY; -const int debug_view_state::REG_FRAME; - - //************************************************************************** // DEBUG VIEW STATE SOURCE //************************************************************************** diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp index 4f06932e321..326089c3f10 100644 --- a/src/emu/rendlay.cpp +++ b/src/emu/rendlay.cpp @@ -4167,7 +4167,8 @@ void layout_view::recompute(u32 visibility_mask, bool zoom_to_screen) // normalize all the item bounds for (item &curitem : items()) { - curitem.m_bounds = curitem.m_rawbounds; + assert(curitem.m_rawbounds.size() == curitem.m_bounds.size()); + std::copy(curitem.m_rawbounds.begin(), curitem.m_rawbounds.end(), curitem.m_bounds.begin()); normalize_bounds(curitem.m_bounds, target_bounds.x0, target_bounds.y0, xoffs, yoffs, xscale, yscale); } @@ -4478,7 +4479,7 @@ layout_view::item::item( // this can be called before resolving tags, make it return something valid m_bounds = m_rawbounds; - m_get_bounds = bounds_delegate(&emu::render::detail::bounds_step::get, &const_cast(m_bounds.front())); + m_get_bounds = bounds_delegate(&emu::render::detail::bounds_step::get, &m_bounds.front()); } @@ -4558,7 +4559,7 @@ void layout_view::item::resolve_tags() // choose optional bounds and colour functions m_get_bounds = (m_bounds.size() == 1U) - ? bounds_delegate(&emu::render::detail::bounds_step::get, &const_cast(m_bounds.front())) + ? bounds_delegate(&emu::render::detail::bounds_step::get, &m_bounds.front()) : bounds_delegate(&item::get_interpolated_bounds, this); m_get_color = (m_color.size() == 1U) ? color_delegate(&emu::render::detail::color_step::get, &const_cast(m_color.front())) diff --git a/src/lib/util/hash.cpp b/src/lib/util/hash.cpp index 5808163b6b9..fd9f2c1d7cd 100644 --- a/src/lib/util/hash.cpp +++ b/src/lib/util/hash.cpp @@ -12,24 +12,20 @@ #include "hash.h" #include "hashing.h" + #include namespace util { + //************************************************************************** // GLOBAL VARIABLES //************************************************************************** -char const hash_collection::HASH_CRC; -char const hash_collection::HASH_SHA1; - char const *const hash_collection::HASH_TYPES_CRC = "R"; char const *const hash_collection::HASH_TYPES_CRC_SHA1 = "RS"; char const *const hash_collection::HASH_TYPES_ALL = "RS"; -char const hash_collection::FLAG_NO_DUMP; -char const hash_collection::FLAG_BAD_DUMP; - //**************************************************************************