Removing Client operator==(int) and operator!=(int) from Ethernet library.

http://code.google.com/p/arduino/issues/detail?id=408
This commit is contained in:
David A. Mellis 2011-03-02 23:45:51 -05:00
parent 4ea2d99c1a
commit 1dd4bd6d2a
2 changed files with 2 additions and 14 deletions

View File

@ -140,18 +140,8 @@ uint8_t Client::status() {
return W5100.readSnSR(_sock);
}
// the next three functions are a hack so we can compare the client returned
// by Server::available() to null, or use it as the condition in an
// if-statement. this lets us stay compatible with the Processing network
// library.
uint8_t Client::operator==(int p) {
return _sock == MAX_SOCK_NUM;
}
uint8_t Client::operator!=(int p) {
return _sock != MAX_SOCK_NUM;
}
// the next function allows us to use the client returned by
// Server::available() as the condition in an if-statement.
Client::operator bool() {
return _sock != MAX_SOCK_NUM;

View File

@ -22,8 +22,6 @@ public:
virtual void flush();
void stop();
uint8_t connected();
uint8_t operator==(int);
uint8_t operator!=(int);
operator bool();
friend class Server;