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:
parent
445433f4f0
commit
757a5d8ec3
@ -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;
|
||||
}
|
||||
|
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user