const
{
Packet p (*this);
- while (p && ! p.is<OtherPacket>())
+ while (p && ! p.is<OtherPacket>())
p = p.next(nothrow);
- if (p)
+ if (p)
return p.as<OtherPacket>();
else
return OtherPacket();
const
{
Packet p (*this);
- while (p && ! p.is<OtherPacket>())
+ while (p && ! p.is<OtherPacket>())
p = p.prev(nothrow);
- if (p)
+ if (p)
return p.as<OtherPacket>();
else
return OtherPacket();