File tree 3 files changed +6
-11
lines changed
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 {
29
29
NetworkInterface *getNetwork () {
30
30
return Ethernet.getNetwork ();
31
31
}
32
- public:
33
- EthernetClient (EthernetClient* orig) : MbedClient(orig) {}
34
- EthernetClient () : MbedClient() {}
35
32
};
36
33
37
34
}
Original file line number Diff line number Diff line change @@ -41,11 +41,12 @@ class MbedClient : public arduino::Client {
41
41
MbedClient ();
42
42
43
43
// 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);
49
50
}
50
51
51
52
virtual ~MbedClient () {
Original file line number Diff line number Diff line change @@ -29,9 +29,6 @@ class WiFiClient : public MbedClient {
29
29
NetworkInterface *getNetwork () {
30
30
return WiFi.getNetwork ();
31
31
}
32
- public:
33
- WiFiClient (WiFiClient* orig) : MbedClient(orig) {}
34
- WiFiClient () : MbedClient() {}
35
32
};
36
33
37
34
}
You can’t perform that action at this time.
0 commit comments