Skip to content

Commit 81dfcee

Browse files
committed
IPv6 raw address
1 parent 5706879 commit 81dfcee

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

api/IPAddress.h

+1-8
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,7 @@ class IPAddress : public Printable {
4949
// to the internal structure rather than a copy of the address this function should only
5050
// be used when you know that the usage of the returned uint8_t* will be transient and not
5151
// stored.
52-
// IPv4 only (for friends)
53-
uint8_t* raw_address() {
54-
if (_type == IPv4) {
55-
return &_address.bytes[12];
56-
}
57-
return nullptr;
58-
};
59-
uint8_t* raw_bytes() { return _address.bytes; }
52+
uint8_t* raw_address() { return _type == IPv4 ? &_address.bytes[12] : _address.bytes; }
6053

6154
public:
6255
// Constructors

0 commit comments

Comments
 (0)