mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd: Degrade enum addressing for clang.
This commit is contained in:
parent
fa7b708e03
commit
5bf62fc33f
6 changed files with 32 additions and 32 deletions
|
@ -137,53 +137,53 @@ const
|
|||
inline ircd::uint128_t &
|
||||
ircd::net::host6(ipport &ipp)
|
||||
{
|
||||
return host6(std::get<ipp.IP>(ipp));
|
||||
return host6(std::get<ipport::IP>(ipp));
|
||||
}
|
||||
|
||||
inline const ircd::uint128_t &
|
||||
ircd::net::host6(const ipport &ipp)
|
||||
{
|
||||
return host6(std::get<ipp.IP>(ipp));
|
||||
return host6(std::get<ipport::IP>(ipp));
|
||||
}
|
||||
|
||||
inline bool
|
||||
ircd::net::is_v6(const ipport &ipp)
|
||||
{
|
||||
return is_v6(std::get<ipp.IP>(ipp));
|
||||
return is_v6(std::get<ipport::IP>(ipp));
|
||||
}
|
||||
|
||||
inline uint32_t &
|
||||
ircd::net::host4(ipport &ipp)
|
||||
{
|
||||
return host4(std::get<ipp.IP>(ipp));
|
||||
return host4(std::get<ipport::IP>(ipp));
|
||||
}
|
||||
|
||||
inline const uint32_t &
|
||||
ircd::net::host4(const ipport &ipp)
|
||||
{
|
||||
return host4(std::get<ipp.IP>(ipp));
|
||||
return host4(std::get<ipport::IP>(ipp));
|
||||
}
|
||||
|
||||
inline bool
|
||||
ircd::net::is_v4(const ipport &ipp)
|
||||
{
|
||||
return is_v4(std::get<ipp.IP>(ipp));
|
||||
return is_v4(std::get<ipport::IP>(ipp));
|
||||
}
|
||||
|
||||
inline uint16_t &
|
||||
ircd::net::port(ipport &ipp)
|
||||
{
|
||||
return std::get<ipp.PORT>(ipp);
|
||||
return std::get<ipport::PORT>(ipp);
|
||||
}
|
||||
|
||||
inline const uint16_t &
|
||||
ircd::net::port(const ipport &ipp)
|
||||
{
|
||||
return std::get<ipp.PORT>(ipp);
|
||||
return std::get<ipport::PORT>(ipp);
|
||||
}
|
||||
|
||||
inline bool
|
||||
ircd::net::is_loop(const ipport &ipp)
|
||||
{
|
||||
return is_loop(std::get<ipp.IP>(ipp));
|
||||
return is_loop(std::get<ipport::IP>(ipp));
|
||||
}
|
||||
|
|
|
@ -377,7 +377,7 @@ ircd::conf::call_env(item<void> &item)
|
|||
noexcept try
|
||||
{
|
||||
assert(size(item.name) <= item.NAME_MAX_LEN);
|
||||
thread_local char key[item.NAME_MAX_LEN];
|
||||
thread_local char key[conf::item<void>::NAME_MAX_LEN];
|
||||
const string_view name
|
||||
{
|
||||
key,
|
||||
|
|
22
ircd/db.cc
22
ircd/db.cc
|
@ -4061,8 +4061,8 @@ const
|
|||
return !for_each(*this, delta_closure_bool{[&op, &col]
|
||||
(const auto &delta)
|
||||
{
|
||||
return std::get<delta.OP>(delta) == op &&
|
||||
std::get<delta.COL>(delta) == col;
|
||||
return std::get<delta::OP>(delta) == op &&
|
||||
std::get<delta::COL>(delta) == col;
|
||||
}});
|
||||
}
|
||||
|
||||
|
@ -4090,8 +4090,8 @@ const
|
|||
return !for_each(*this, delta_closure_bool{[&op, &col, &closure]
|
||||
(const delta &delta)
|
||||
{
|
||||
if(std::get<delta.OP>(delta) == op &&
|
||||
std::get<delta.COL>(delta) == col)
|
||||
if(std::get<delta::OP>(delta) == op &&
|
||||
std::get<delta::COL>(delta) == col)
|
||||
{
|
||||
closure(delta);
|
||||
return false;
|
||||
|
@ -4109,9 +4109,9 @@ const
|
|||
return !for_each(*this, delta_closure_bool{[&op, &col, &key]
|
||||
(const auto &delta)
|
||||
{
|
||||
return std::get<delta.OP>(delta) == op &&
|
||||
std::get<delta.COL>(delta) == col &&
|
||||
std::get<delta.KEY>(delta) == key;
|
||||
return std::get<delta::OP>(delta) == op &&
|
||||
std::get<delta::COL>(delta) == col &&
|
||||
std::get<delta::KEY>(delta) == key;
|
||||
}});
|
||||
}
|
||||
|
||||
|
@ -4142,11 +4142,11 @@ const
|
|||
return !for_each(*this, delta_closure_bool{[&op, &col, &key, &closure]
|
||||
(const delta &delta)
|
||||
{
|
||||
if(std::get<delta.OP>(delta) == op &&
|
||||
std::get<delta.COL>(delta) == col &&
|
||||
std::get<delta.KEY>(delta) == key)
|
||||
if(std::get<delta::OP>(delta) == op &&
|
||||
std::get<delta::COL>(delta) == col &&
|
||||
std::get<delta::KEY>(delta) == key)
|
||||
{
|
||||
closure(std::get<delta.VAL>(delta));
|
||||
closure(std::get<delta::VAL>(delta));
|
||||
return false;
|
||||
}
|
||||
else return true;
|
||||
|
|
10
ircd/fs.cc
10
ircd/fs.cc
|
@ -2248,13 +2248,13 @@ ircd::fs::basepath::set(const base &base,
|
|||
{
|
||||
log, "Updating base path #%u '%s' from `%s' to `%s'",
|
||||
uint(base),
|
||||
basepaths.at(base).name,
|
||||
basepaths.at(base).path,
|
||||
basepaths.at(uint(base)).name,
|
||||
basepaths.at(uint(base)).path,
|
||||
path,
|
||||
};
|
||||
|
||||
const string_view ret(basepaths.at(base).path);
|
||||
basepaths.at(base).path = path;
|
||||
const string_view ret(basepaths.at(uint(base)).path);
|
||||
basepaths.at(uint(base)).path = path;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2262,7 +2262,7 @@ const ircd::fs::basepath &
|
|||
ircd::fs::basepath::get(const base &base)
|
||||
noexcept
|
||||
{
|
||||
return basepaths.at(base);
|
||||
return basepaths.at(uint(base));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -1731,7 +1731,7 @@ ircd::json::stringify(mutable_buffer &buf,
|
|||
const iov &iov)
|
||||
{
|
||||
const ctx::critical_assertion ca;
|
||||
thread_local const member *m[iov.max_size];
|
||||
thread_local const member *m[iov::max_size];
|
||||
if(unlikely(size_t(iov.size()) > iov.max_size))
|
||||
throw iov::oversize
|
||||
{
|
||||
|
|
10
ircd/net.cc
10
ircd/net.cc
|
@ -4413,7 +4413,7 @@ ircd::net::string(const mutable_buffer &buf,
|
|||
consume(out, copy(out, "["_sv));
|
||||
|
||||
if(ipp)
|
||||
consume(out, size(string(out, std::get<ipp.IP>(ipp))));
|
||||
consume(out, size(string(out, std::get<ipport::IP>(ipp))));
|
||||
|
||||
if(need_bracket)
|
||||
consume(out, copy(out, "]"_sv));
|
||||
|
@ -4453,7 +4453,7 @@ ircd::net::make_endpoint_udp(const ipport &ipport)
|
|||
{
|
||||
return
|
||||
{
|
||||
make_address(std::get<ipport.IP>(ipport)), port(ipport)
|
||||
make_address(std::get<ipport::IP>(ipport)), port(ipport)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -4462,7 +4462,7 @@ ircd::net::make_endpoint(const ipport &ipport)
|
|||
{
|
||||
return
|
||||
{
|
||||
make_address(std::get<ipport.IP>(ipport)), port(ipport)
|
||||
make_address(std::get<ipport::IP>(ipport)), port(ipport)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -4474,14 +4474,14 @@ bool
|
|||
ircd::net::ipport::cmp_ip::operator()(const ipport &a, const ipport &b)
|
||||
const
|
||||
{
|
||||
return ipaddr::cmp()(std::get<a.IP>(a), std::get<b.IP>(b));
|
||||
return ipaddr::cmp()(std::get<ipport::IP>(a), std::get<ipport::IP>(b));
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::net::ipport::cmp_port::operator()(const ipport &a, const ipport &b)
|
||||
const
|
||||
{
|
||||
return std::get<a.PORT>(a) < std::get<b.PORT>(b);
|
||||
return std::get<ipport::PORT>(a) < std::get<ipport::PORT>(b);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in a new issue