0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-25 15:04:10 +01:00

ircd::ctx: Ensure assert_critical() callsite DCE in non-debugmode.

This commit is contained in:
Jason Volk 2019-10-09 16:30:08 -07:00
parent fb13b1158e
commit 7e21c1c8db
2 changed files with 8 additions and 6 deletions

View file

@ -40,3 +40,11 @@ class ircd::ctx::this_ctx::critical_assertion
~critical_assertion() noexcept;
#endif
};
#ifdef NDEBUG
inline void
ircd::ctx::assert_critical()
{
// eliminated in non-debug mode.
}
#endif

View file

@ -915,12 +915,6 @@ ircd::ctx::assert_critical()
{
"%lu '%s' :Illegal context switch", id(), name()
};
}
#else
void
ircd::ctx::assert_critical()
{
}
#endif