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

ircd:Ⓜ️:event: Elide the query for empty event_id's for event exists.

This commit is contained in:
Jason Volk 2019-06-01 18:17:15 -07:00
parent dd49243224
commit 132f18327b

View file

@ -3776,7 +3776,7 @@ ircd::m::count(const event::prev &prev)
bool
ircd::m::good(const id::event &event_id)
{
return index(event_id, std::nothrow) != 0;
return bool(event_id) && index(event_id, std::nothrow) != 0;
}
bool
@ -3796,7 +3796,7 @@ ircd::m::exists(const id::event &event_id)
dbs::event_idx
};
return has(column, event_id);
return bool(event_id) && has(column, event_id);
}
ircd::string_view