mirror of
https://github.com/holub/mame
synced 2025-04-27 18:53:05 +03:00
debugcpu.cpp: Eliminate unnecessary downcast (nw)
This commit is contained in:
parent
c2ae911a50
commit
30c9c6fcd2
@ -88,11 +88,14 @@ debugger_cpu::debugger_cpu(running_machine &machine)
|
|||||||
|
|
||||||
/* first CPU is visible by default */
|
/* first CPU is visible by default */
|
||||||
for (device_t &device : device_iterator(m_machine.root_device()))
|
for (device_t &device : device_iterator(m_machine.root_device()))
|
||||||
if (dynamic_cast<cpu_device *>(&device) != nullptr)
|
|
||||||
{
|
{
|
||||||
m_visiblecpu = downcast<cpu_device *>(&device);
|
auto *cpu = dynamic_cast<cpu_device *>(&device);
|
||||||
|
if (cpu != nullptr)
|
||||||
|
{
|
||||||
|
m_visiblecpu = cpu;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* add callback for breaking on VBLANK */
|
/* add callback for breaking on VBLANK */
|
||||||
if (m_machine.first_screen() != nullptr)
|
if (m_machine.first_screen() != nullptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user