0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

ircd::net: Deinline some ipport ctors.

This commit is contained in:
Jason Volk 2018-09-29 16:31:27 -07:00
parent cedfff720a
commit b4e4f0165f
2 changed files with 19 additions and 21 deletions

View file

@ -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

View file

@ -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