Changed Packet::operator bool() to Packet::operator void*(), to avoid inappropriate implicit conversions
This commit is contained in:
parent
1a59b9291e
commit
1526d09701
@ -159,7 +159,7 @@ public :
|
||||
/// \see EndOfPacket
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
operator bool() const;
|
||||
operator void*() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Overloads of operator >> to read data from the packet
|
||||
|
@ -92,9 +92,9 @@ bool Packet::EndOfPacket() const
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
Packet::operator bool() const
|
||||
Packet::operator void*() const
|
||||
{
|
||||
return myIsValid;
|
||||
return myIsValid ? this : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user