0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-26 18:38:52 +02:00

ircd:Ⓜ️:event::refs: Minor cleanup; formatting; use static_assert.

This commit is contained in:
Jason Volk 2019-09-17 18:35:28 -07:00
parent a3163a5ae7
commit 1cf54095b4

View file

@ -1962,10 +1962,17 @@ const
// Allow -1 to iterate through all types by starting
// the iteration at type value 0 and then ignoring the
// type as a loop continue condition.
const bool all_type(type == dbs::ref(uint8_t(-1)));
const auto &_type{all_type? dbs::ref::NEXT : type};
assert(uint8_t(dbs::ref::NEXT) == 0);
const bool all_type
{
type == dbs::ref(uint8_t(-1))
}'
const auto &_type
{
all_type? dbs::ref::NEXT : type
};
static_assert(uint8_t(dbs::ref::NEXT) == 0);
char buf[dbs::EVENT_REFS_KEY_MAX_SIZE];
const string_view key
{