From 30c9c6fcd2c7b036ed0d774ea5afd7b62f77d22f Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 5 Jan 2018 15:22:42 -0500 Subject: [PATCH] debugcpu.cpp: Eliminate unnecessary downcast (nw) --- src/emu/debug/debugcpu.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index fb762697dfd..71429112419 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -88,11 +88,14 @@ debugger_cpu::debugger_cpu(running_machine &machine) /* first CPU is visible by default */ for (device_t &device : device_iterator(m_machine.root_device())) - if (dynamic_cast(&device) != nullptr) + { + auto *cpu = dynamic_cast(&device); + if (cpu != nullptr) { - m_visiblecpu = downcast(&device); + m_visiblecpu = cpu; break; } + } /* add callback for breaking on VBLANK */ if (m_machine.first_screen() != nullptr)