mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-29 10:17:15 +02:00
const correctness (#89)
make IPAddress.toString() const method, it doesn't modify anything within the class.
This commit is contained in:
@ -72,7 +72,7 @@ size_t IPAddress::printTo(Print& p) const
|
||||
return n;
|
||||
}
|
||||
|
||||
String IPAddress::toString()
|
||||
String IPAddress::toString() const
|
||||
{
|
||||
char szRet[16];
|
||||
sprintf(szRet,"%u.%u.%u.%u", _address.bytes[0], _address.bytes[1], _address.bytes[2], _address.bytes[3]);
|
||||
@ -119,4 +119,4 @@ bool IPAddress::fromString(const char *address)
|
||||
}
|
||||
_address.bytes[3] = acc;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user