diff options
author | Vas Crabb <vas@vastheman.com> | 2017-07-24 10:24:10 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2017-07-24 10:24:10 +1000 |
commit | 867f145b06b8d664f778ff8b9765485d66b4aafc (patch) | |
tree | ab620f3d4ac86742cfe3939a89c1ccf1e1717697 | |
parent | e9e209a34c8607b74811cd1c08bbfef8cadd214e (diff) |
scope stuff down again, rvalue on left of ==, fewer early exits (nw)
-rw-r--r-- | src/mame/video/wolfpack.cpp | 15 | ||||
-rw-r--r-- | src/osd/modules/debugger/win/consolewininfo.cpp | 34 |
2 files changed, 23 insertions, 26 deletions
diff --git a/src/mame/video/wolfpack.cpp b/src/mame/video/wolfpack.cpp index 0f2f9e6974f..0d35050a597 100644 --- a/src/mame/video/wolfpack.cpp +++ b/src/mame/video/wolfpack.cpp @@ -96,19 +96,14 @@ WRITE8_MEMBER(wolfpack_state::torpedo_v_w) void wolfpack_state::video_start() { - uint16_t val = 0; - - m_LFSR = std::make_unique<uint8_t[]>(0x8000); - m_screen->register_screen_bitmap(m_helper); - for (int i = 0; i < 0x8000; i++) + m_LFSR = std::make_unique<uint8_t []>(0x8000); + for (uint16_t i = 0, val = 0; i < 0x8000; i++) { - int bit = (val >> 0x0) ^ (val >> 0xe) ^ 1; - - val = (val << 1) | (bit & 1); - - m_LFSR[i] = (val & 0xc00) == 0xc00; + uint16_t const bit = ~(val ^ (val >> 14)) & 1; + val = (val << 1) | bit; + m_LFSR[i] = (val & 0x0c00) == 0x0c00; } m_current_index = 0x80; diff --git a/src/osd/modules/debugger/win/consolewininfo.cpp b/src/osd/modules/debugger/win/consolewininfo.cpp index 1b7fd42b492..9662ec096cd 100644 --- a/src/osd/modules/debugger/win/consolewininfo.cpp +++ b/src/osd/modules/debugger/win/consolewininfo.cpp @@ -95,25 +95,27 @@ consolewin_info::~consolewin_info() { } + void consolewin_info::set_cpu(device_t &device) { // exit if this cpu is already selected - if (m_current_cpu == &device) - return; - m_current_cpu = &device; - - // first set all the views to the new cpu number - m_views[0]->set_source_for_device(device); - m_views[1]->set_source_for_device(device); - - // then update the caption - std::string title = string_format("Debug: %s - %s '%s'", device.machine().system().name, device.name(), device.tag()); - std::string curtitle = win_get_window_text_utf8(window()); - if (title != curtitle) - win_set_window_text_utf8(window(), title.c_str()); - - // and recompute the children - recompute_children(); + if (&device != m_current_cpu) + { + m_current_cpu = &device; + + // first set all the views to the new cpu number + m_views[0]->set_source_for_device(device); + m_views[1]->set_source_for_device(device); + + // then update the caption + std::string title = string_format("Debug: %s - %s '%s'", device.machine().system().name, device.name(), device.tag()); + std::string curtitle = win_get_window_text_utf8(window()); + if (title != curtitle) + win_set_window_text_utf8(window(), title.c_str()); + + // and recompute the children + recompute_children(); + } } |