summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-01-05 15:22:42 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-01-05 15:22:42 -0500
commit30c9c6fcd2c7b036ed0d774ea5afd7b62f77d22f (patch)
treed803269bf2c38616e36bbcad77c06b5029f9ea8f /src/emu/debug/debugcpu.cpp
parentc2ae911a503c7fdee2694f6517f6463adc538cf4 (diff)
debugcpu.cpp: Eliminate unnecessary downcast (nw)
Diffstat (limited to 'src/emu/debug/debugcpu.cpp')
-rw-r--r--src/emu/debug/debugcpu.cpp7
1 files 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<cpu_device *>(&device) != nullptr)
+ {
+ auto *cpu = dynamic_cast<cpu_device *>(&device);
+ if (cpu != nullptr)
{
- m_visiblecpu = downcast<cpu_device *>(&device);
+ m_visiblecpu = cpu;
break;
}
+ }
/* add callback for breaking on VBLANK */
if (m_machine.first_screen() != nullptr)