Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit81dfcee

Browse files
committed
IPv6 raw address
1 parent5706879 commit81dfcee

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

‎api/IPAddress.h‎

Lines changed: 1 addition & 8 deletions
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-
returnnullptr;
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)

[8]ページ先頭

©2009-2025 Movatter.jp