mirror of
https://github.com/matrix-construct/construct
synced 2024-12-30 17:34:04 +01:00
ircd:Ⓜ️ Assert non-empty event_id for the throwing index(event_id).
This commit is contained in:
parent
10fcd5ee21
commit
9629028552
1 changed files with 1 additions and 5 deletions
|
@ -1693,18 +1693,14 @@ catch(const json::not_found &)
|
||||||
ircd::m::event::idx
|
ircd::m::event::idx
|
||||||
ircd::m::index(const event &event,
|
ircd::m::index(const event &event,
|
||||||
std::nothrow_t)
|
std::nothrow_t)
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return index(event.event_id, std::nothrow);
|
return index(event.event_id, std::nothrow);
|
||||||
}
|
}
|
||||||
catch(const json::not_found &)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ircd::m::event::idx
|
ircd::m::event::idx
|
||||||
ircd::m::index(const event::id &event_id)
|
ircd::m::index(const event::id &event_id)
|
||||||
{
|
{
|
||||||
|
assert(event_id);
|
||||||
const auto ret
|
const auto ret
|
||||||
{
|
{
|
||||||
index(event_id, std::nothrow)
|
index(event_id, std::nothrow)
|
||||||
|
|
Loading…
Reference in a new issue