Skip to content

Commit eb0c2c9

Browse files
author
Federico Fissore
committed
Added virtual bool operator==(const bool value) and virtual bool operator!=(const bool value).
Fixes arduino#2611 Bug introduced with arduino#1700
1 parent cf3e948 commit eb0c2c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/Ethernet/src/EthernetClient.h

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class EthernetClient : public Client {
2424
virtual void stop();
2525
virtual uint8_t connected();
2626
virtual operator bool();
27+
virtual bool operator==(const bool value) { return bool() == value; }
28+
virtual bool operator!=(const bool value) { return bool() != value; }
2729
virtual bool operator==(const EthernetClient&);
2830
virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); };
2931

0 commit comments

Comments
 (0)