mirror of
https://github.com/transmission/transmission
synced 2025-01-03 05:25:52 +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
|
#ifdef _WIN32
|
||||||
auto inline constexpr TrUnixAddrStrLen = size_t{ INET6_ADDRSTRLEN };
|
auto inline constexpr TrUnixAddrStrLen = size_t{ INET6_ADDRSTRLEN };
|
||||||
#else
|
#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) };
|
std::size(TrUnixSocketPrefix) };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue