Skip to content

Commit a929b32

Browse files
committed
Revert operator bool() for UDP
1 parent 5ea1e21 commit a929b32

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

Firmware/RTK_Surveyor/NetworkUDP.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,12 @@ class NetworkUDP : public UDP
5656

5757
//------------------------------
5858
// Determine if the network client was allocated
59+
// Note: EthernetUDP and WiFiUDP do not have operator bool() methods
5960
//------------------------------
6061

6162
operator bool()
6263
{
63-
#if defined(COMPILE_ETHERNET)
64-
if (_networkType == NETWORK_TYPE_ETHERNET)
65-
if (_udp)
66-
return (*((EthernetUDP *)_udp));
67-
#endif // COMPILE_ETHERNET
68-
#if defined(COMPILE_WIFI)
69-
if (_networkType == NETWORK_TYPE_WIFI)
70-
if (_udp)
71-
return (*((WiFiUDP *)_udp));
72-
#endif // COMPILE_WIFI
73-
return false;
64+
return _udp;
7465
}
7566

7667
//------------------------------

0 commit comments

Comments
 (0)