mirror of
https://github.com/transmission/transmission
synced 2024-12-22 07:42:37 +00:00
Use std::declval instead of nullptr cast trick (#6785)
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
This commit is contained in:
parent
92519281b0
commit
bd0b74fccb
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ auto constexpr TrUnixSocketPrefix = "unix:"sv;
|
|||
#ifdef _WIN32
|
||||
auto inline constexpr TrUnixAddrStrLen = size_t{ INET6_ADDRSTRLEN };
|
||||
#else
|
||||
auto inline constexpr TrUnixAddrStrLen = size_t{ sizeof(((struct sockaddr_un*)nullptr)->sun_path) +
|
||||
auto inline constexpr TrUnixAddrStrLen = size_t{ sizeof(std::declval<struct sockaddr_un>().sun_path) +
|
||||
std::size(TrUnixSocketPrefix) };
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue