0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-19 19:33:45 +02:00

ircd::json::tuple: Add missing linkages; branch expect; constness.

This commit is contained in:
Jason Volk 2022-05-27 03:51:24 -07:00
parent 3cc9743c2c
commit 48486c2e27
3 changed files with 10 additions and 10 deletions

View file

@ -37,7 +37,7 @@ _key_transform(it_a it,
const it_b &end,
closure&& lambda)
{
if(it != end)
if(likely(it != end))
{
*it = lambda(key<tuple, i>());
++it;
@ -63,7 +63,7 @@ _key_transform(it_a it,
template<class it_a,
class it_b,
class... T>
auto
constexpr auto
_key_transform(const tuple<T...> &tuple,
it_a it,
const it_b &end)

View file

@ -18,7 +18,7 @@ template<class it_a,
class it_b,
class closure,
class... T>
auto
inline auto
_member_transform_if(const tuple<T...> &tuple,
it_a it,
const it_b end,
@ -30,7 +30,7 @@ _member_transform_if(const tuple<T...> &tuple,
if(it == end)
return false;
if(lambda(*it, key, val))
if(likely(lambda(*it, key, val)))
++it;
return true;
@ -43,7 +43,7 @@ template<class it_a,
class it_b,
class closure,
class... T>
auto
inline auto
_member_transform(const tuple<T...> &tuple,
it_a it,
const it_b end,
@ -60,7 +60,7 @@ _member_transform(const tuple<T...> &tuple,
template<class it_a,
class it_b,
class... T>
auto
inline auto
_member_transform(const tuple<T...> &tuple,
it_a it,
const it_b end)

View file

@ -46,7 +46,7 @@ serialized(const tuple<T...> &t)
}
template<class... T>
size_t
inline size_t
serialized(const tuple<T...> *const &b,
const tuple<T...> *const &e)
{
@ -84,10 +84,10 @@ stringify(mutable_buffer &buf,
}
template<class... T>
string_view
inline string_view
stringify(mutable_buffer &buf,
const tuple<T...> *b,
const tuple<T...> *e)
const tuple<T...> *const &e)
{
const auto start(begin(buf));
consume(buf, copy(buf, '['));
@ -105,7 +105,7 @@ stringify(mutable_buffer &buf,
}
template<class... T>
std::ostream &
inline std::ostream &
operator<<(std::ostream &s, const tuple<T...> &t)
{
s << json::strung(t);