mirror of
https://github.com/holub/mame
synced 2025-06-05 04:16:28 +03:00
placed this back, bad OG :) (nw)
This commit is contained in:
parent
23a88d558b
commit
558d6e192d
@ -589,6 +589,10 @@ private:
|
||||
|
||||
inline device_t *device_t::subdevice(std::string tag) const
|
||||
{
|
||||
// safety first
|
||||
if (this == nullptr)
|
||||
return nullptr;
|
||||
|
||||
// empty string means this device
|
||||
if (tag.empty())
|
||||
return const_cast<device_t *>(this);
|
||||
@ -606,6 +610,10 @@ inline device_t *device_t::subdevice(std::string tag) const
|
||||
|
||||
inline device_t *device_t::siblingdevice(std::string tag) const
|
||||
{
|
||||
// safety first
|
||||
if (this == nullptr)
|
||||
return nullptr;
|
||||
|
||||
// empty string or NULL means this device
|
||||
if (tag.empty())
|
||||
return const_cast<device_t *>(this);
|
||||
|
Loading…
Reference in New Issue
Block a user