Skip to content

Commit c0122d1

Browse files
committed
Merge pull request arduino#2618 from ffissore/fix-ethernetclient-boolean-comparison
EthernetClient == and != operators
2 parents 606604d + eb0c2c9 commit c0122d1

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)