1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

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); return W5100.readSnSR(_sock);
} }
// the next three functions are a hack so we can compare the client returned // the next function allows us to use the client returned by
// by Server::available() to null, or use it as the condition in an // Server::available() as the condition in an if-statement.
// 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;
}
Client::operator bool() { Client::operator bool() {
return _sock != MAX_SOCK_NUM; return _sock != MAX_SOCK_NUM;

View File

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