1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

add constexpr noexcept (#5729)

This commit is contained in:
tearfur 2023-07-05 12:50:39 +08:00 committed by GitHub
parent 8543555584
commit 2a9c30a616
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,17 +166,17 @@ struct peer_atom
return (flags & ADDED_F_SEED_FLAG) != 0;
}
[[nodiscard]] auto const& addr() const
[[nodiscard]] constexpr auto const& addr() const noexcept
{
return socket_address.first;
}
[[nodiscard]] auto& port()
[[nodiscard]] constexpr auto& port() noexcept
{
return socket_address.second;
}
[[nodiscard]] auto const& port() const
[[nodiscard]] constexpr auto const& port() const noexcept
{
return socket_address.second;
}