diff --git a/include/SFML/Network/Packet.hpp b/include/SFML/Network/Packet.hpp index 4c8c6404..a4a2cb73 100644 --- a/include/SFML/Network/Packet.hpp +++ b/include/SFML/Network/Packet.hpp @@ -159,7 +159,7 @@ public : /// \see EndOfPacket /// //////////////////////////////////////////////////////////// - operator bool() const; + operator void*() const; //////////////////////////////////////////////////////////// /// Overloads of operator >> to read data from the packet diff --git a/src/SFML/Network/Packet.cpp b/src/SFML/Network/Packet.cpp index 11cf5d58..5b668969 100644 --- a/src/SFML/Network/Packet.cpp +++ b/src/SFML/Network/Packet.cpp @@ -92,9 +92,9 @@ bool Packet::EndOfPacket() const //////////////////////////////////////////////////////////// -Packet::operator bool() const +Packet::operator void*() const { - return myIsValid; + return myIsValid ? this : NULL; }