net/{Allocated,Static}SocketAddress: inline GetLocalRaw()

This commit is contained in:
Max Kellermann 2024-04-29 16:41:45 +02:00 committed by Max Kellermann
parent 2a206ef309
commit f8529d4fe6
4 changed files with 6 additions and 18 deletions

View File

@ -37,12 +37,6 @@ AllocatedSocketAddress::SetSize(size_type new_size) noexcept
#ifdef HAVE_UN
std::string_view
AllocatedSocketAddress::GetLocalRaw() const noexcept
{
return SocketAddress(*this).GetLocalRaw();
}
void
AllocatedSocketAddress::SetLocal(const char *path) noexcept
{

View File

@ -125,7 +125,9 @@ public:
* @see SocketAddress::GetLocalRaw()
*/
[[gnu::pure]]
std::string_view GetLocalRaw() const noexcept;
std::string_view GetLocalRaw() const noexcept {
return static_cast<const SocketAddress>(*this).GetLocalRaw();
}
/**
* @see SocketAddress::GetLocalPath()

View File

@ -17,16 +17,6 @@ StaticSocketAddress::operator=(SocketAddress other) noexcept
return *this;
}
#ifdef HAVE_UN
std::string_view
StaticSocketAddress::GetLocalRaw() const noexcept
{
return SocketAddress(*this).GetLocalRaw();
}
#endif
#ifdef HAVE_TCP
bool

View File

@ -103,7 +103,9 @@ public:
* @see SocketAddress::GetLocalRaw()
*/
[[gnu::pure]]
std::string_view GetLocalRaw() const noexcept;
std::string_view GetLocalRaw() const noexcept {
return static_cast<const SocketAddress>(*this).GetLocalRaw();
}
/**
* @see SocketAddress::GetLocalPath()