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

ircd:Ⓜ️🪝:base: Document assertions; relax assertion.

This commit is contained in:
Jason Volk 2019-09-10 17:32:27 -07:00
parent da695998ff
commit 81db366a78

View file

@ -3182,10 +3182,21 @@ noexcept
if(!registered)
return;
auto *const site(find_site());
auto *const site
{
find_site()
};
// should be non-null if !registered
assert(site != nullptr);
assert(site->calling == 0);
// if someone is calling and inside this hook we shouldn't be destructing
assert(calling == 0);
// if someone is calling the hook::site but inside some other hook, we can
// still remove this hook from the site.
//assert(site->calling == 0);
site->del(*this);
}