mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
ircd::net: Deinline some ipport ctors.
This commit is contained in:
parent
cedfff720a
commit
b4e4f0165f
2 changed files with 19 additions and 21 deletions
|
@ -79,26 +79,7 @@ ircd::net::ipport::ipport()
|
|||
std::get<PORT>(*this) = 0;
|
||||
std::get<TYPE>(*this) = 0;
|
||||
auto &ip(std::get<IP>(*this));
|
||||
std::fill(begin(ip), end(ip), 0x0);
|
||||
}
|
||||
|
||||
inline
|
||||
ircd::net::ipport::ipport(const uint32_t &ip,
|
||||
const uint16_t &p)
|
||||
{
|
||||
std::get<TYPE>(*this) = false;
|
||||
host6(*this) = 0;
|
||||
host4(*this) = ip;
|
||||
port(*this) = p;
|
||||
}
|
||||
|
||||
inline
|
||||
ircd::net::ipport::ipport(const uint128_t &ip,
|
||||
const uint16_t &p)
|
||||
{
|
||||
std::get<TYPE>(*this) = true;
|
||||
host6(*this) = ip;
|
||||
port(*this) = p;
|
||||
ip.fill(0);
|
||||
}
|
||||
|
||||
inline ircd::net::ipport::operator
|
||||
|
|
19
ircd/net.cc
19
ircd/net.cc
|
@ -3996,7 +3996,7 @@ ircd::net::make_endpoint(const ipport &ipport)
|
|||
}
|
||||
|
||||
//
|
||||
// ipport
|
||||
// ipport::ipport
|
||||
//
|
||||
|
||||
ircd::net::ipport::ipport(const string_view &ip,
|
||||
|
@ -4049,6 +4049,23 @@ ircd::net::ipport::ipport(const boost::asio::ip::address &address,
|
|||
else host4(*this) = address.to_v4().to_ulong();
|
||||
}
|
||||
|
||||
ircd::net::ipport::ipport(const uint32_t &ip,
|
||||
const uint16_t &p)
|
||||
{
|
||||
std::get<TYPE>(*this) = false;
|
||||
host6(*this) = 0;
|
||||
host4(*this) = ip;
|
||||
port(*this) = p;
|
||||
}
|
||||
|
||||
ircd::net::ipport::ipport(const uint128_t &ip,
|
||||
const uint16_t &p)
|
||||
{
|
||||
std::get<TYPE>(*this) = true;
|
||||
host6(*this) = ip;
|
||||
port(*this) = p;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// net/hostport.h
|
||||
|
|
Loading…
Reference in a new issue