mirror of
https://github.com/matrix-construct/construct
synced 2025-01-18 18:41:55 +01:00
ircd:Ⓜ️:event::refs: Minor cleanup; formatting; use static_assert.
This commit is contained in:
parent
a3163a5ae7
commit
1cf54095b4
1 changed files with 10 additions and 3 deletions
|
@ -1962,10 +1962,17 @@ const
|
||||||
// Allow -1 to iterate through all types by starting
|
// Allow -1 to iterate through all types by starting
|
||||||
// the iteration at type value 0 and then ignoring the
|
// the iteration at type value 0 and then ignoring the
|
||||||
// type as a loop continue condition.
|
// type as a loop continue condition.
|
||||||
const bool all_type(type == dbs::ref(uint8_t(-1)));
|
const bool all_type
|
||||||
const auto &_type{all_type? dbs::ref::NEXT : type};
|
{
|
||||||
assert(uint8_t(dbs::ref::NEXT) == 0);
|
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];
|
char buf[dbs::EVENT_REFS_KEY_MAX_SIZE];
|
||||||
const string_view key
|
const string_view key
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue