1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Add virtual destructor to WiFiServer class (#2116)

Without this line compiler complains about :

Warning		22:9: warning: deleting object of polymorphic class type 'WiFiServer' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]		\\Mac\Home\Documents\Visual Studio 2015\Projects\BlinkESP8266_12\ActAsWiFi_server\SVServer.cpp	22

Reason for this is that I would like to init WiFiServer with port which can by dynamically chosen (for example by serial port)

internalServer = new WiFiServer(port);
This commit is contained in:
Anton Sokolchenko 2016-06-08 10:51:50 +03:00 committed by Ivan Grokhotkov
parent 5eb6a7f449
commit 533a600d95

View File

@ -47,6 +47,7 @@ private:
public: public:
WiFiServer(IPAddress addr, uint16_t port); WiFiServer(IPAddress addr, uint16_t port);
WiFiServer(uint16_t port); WiFiServer(uint16_t port);
virtual ~WiFiServer() {}
WiFiClient available(uint8_t* status = NULL); WiFiClient available(uint8_t* status = NULL);
bool hasClient(); bool hasClient();
void begin(); void begin();