File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,6 @@ class EthernetClient : public MbedClient {
2929 NetworkInterface *getNetwork () {
3030 return Ethernet.getNetwork ();
3131 }
32- public:
33- EthernetClient (EthernetClient* orig) : MbedClient(orig) {}
34- EthernetClient () : MbedClient() {}
3532};
3633
3734}
Original file line number Diff line number Diff line change @@ -41,11 +41,12 @@ class MbedClient : public arduino::Client {
4141 MbedClient ();
4242
4343 // Find something better to save the socket, this is nwither copy nor move constructor
44- MbedClient (MbedClient* orig) {
45- this ->sock = orig->sock ;
46- orig->borrowed_socket = true ;
47- orig->stop ();
48- this ->setSocket (orig->sock );
44+ MbedClient (const MbedClient& orig) {
45+ auto _sock = orig.sock ;
46+ auto _m = (MbedClient*)&orig;
47+ _m->borrowed_socket = true ;
48+ _m->stop ();
49+ this ->setSocket (_sock);
4950 }
5051
5152 virtual ~MbedClient () {
Original file line number Diff line number Diff line change @@ -29,9 +29,6 @@ class WiFiClient : public MbedClient {
2929 NetworkInterface *getNetwork () {
3030 return WiFi.getNetwork ();
3131 }
32- public:
33- WiFiClient (WiFiClient* orig) : MbedClient(orig) {}
34- WiFiClient () : MbedClient() {}
3532};
3633
3734}
You can’t perform that action at this time.
0 commit comments