1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-11-27 04:34:42 +01:00

Add virtual destructor to NetworkAddress.

Subclasses of NetworkAddress are deleted using pointers to the base class,
so a virtual destructor is required. Also fix a couple of warnings on 64bit.
This commit is contained in:
John Preston 2017-07-06 20:16:18 +03:00
parent 445433f4f0
commit 757a5d8ec3
2 changed files with 2 additions and 1 deletions

View File

@ -292,7 +292,7 @@ void NetworkSocketTCPObfuscated::Receive(NetworkPacket *packet){
}
if(packetLen>packet->length){
LOGW("packet too big to fit into buffer (%u vs %u)", packetLen, packet->length);
LOGW("packet too big to fit into buffer (%u vs %u)", (unsigned int)packetLen, (unsigned int)packet->length);
packet->length=0;
return;
}

View File

@ -28,6 +28,7 @@ namespace tgvoip {
virtual std::string ToString()=0;
bool operator==(const NetworkAddress& other);
bool operator!=(const NetworkAddress& other);
virtual ~NetworkAddress()=default;
};
class IPv4Address : public NetworkAddress{