placed this back, bad OG :) (nw)

This commit is contained in:
Miodrag Milanovic 2016-01-17 14:47:34 +01:00
parent 23a88d558b
commit 558d6e192d

View File

@ -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);