Skip to content

Commit 634ed18

Browse files
committed
Removing Client operator==(int) and operator!=(int) from Ethernet library.
http://code.google.com/p/arduino/issues/detail?id=408
1 parent 3602d1c commit 634ed18

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

Client.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,8 @@ uint8_t Client::status() {
140140
return W5100.readSnSR(_sock);
141141
}
142142

143-
// the next three functions are a hack so we can compare the client returned
144-
// by Server::available() to null, or use it as the condition in an
145-
// if-statement. this lets us stay compatible with the Processing network
146-
// library.
147-
148-
uint8_t Client::operator==(int p) {
149-
return _sock == MAX_SOCK_NUM;
150-
}
151-
152-
uint8_t Client::operator!=(int p) {
153-
return _sock != MAX_SOCK_NUM;
154-
}
143+
// the next function allows us to use the client returned by
144+
// Server::available() as the condition in an if-statement.
155145

156146
Client::operator bool() {
157147
return _sock != MAX_SOCK_NUM;

Client.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ class Client : public Stream {
2222
virtual void flush();
2323
void stop();
2424
uint8_t connected();
25-
uint8_t operator==(int);
26-
uint8_t operator!=(int);
2725
operator bool();
2826

2927
friend class Server;

0 commit comments

Comments
 (0)