mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user