Implemented the sf::Packet to bool conversion using the safe-bool idiom
This commit is contained in:
parent
43d4d0bb28
commit
94ab420dd3
2 changed files with 19 additions and 3 deletions
|
@ -92,9 +92,9 @@ bool Packet::EndOfPacket() const
|
|||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
Packet::operator void*() const
|
||||
Packet::operator BoolType() const
|
||||
{
|
||||
return myIsValid ? const_cast<Packet*>(this) : NULL;
|
||||
return myIsValid ? &Packet::CheckSize : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue