net/SocketError: cast to socket_error_t to fix -Wsign-compare
Only relevant on Windows where socket_error_t is a `DWORD` (unsigned).
This commit is contained in:
@@ -176,7 +176,7 @@ IsSocketError(const std::system_error &e) noexcept
|
|||||||
static inline bool
|
static inline bool
|
||||||
IsSocketError(const std::system_error &e, socket_error_t code) noexcept
|
IsSocketError(const std::system_error &e, socket_error_t code) noexcept
|
||||||
{
|
{
|
||||||
return IsSocketError(e) && e.code().value() == code;
|
return IsSocketError(e) && static_cast<socket_error_t>(e.code().value()) == code;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[gnu::pure]]
|
[[gnu::pure]]
|
||||||
|
Reference in New Issue
Block a user