mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd::ctx: Ensure assert_critical() callsite DCE in non-debugmode.
This commit is contained in:
parent
fb13b1158e
commit
7e21c1c8db
2 changed files with 8 additions and 6 deletions
|
@ -40,3 +40,11 @@ class ircd::ctx::this_ctx::critical_assertion
|
||||||
~critical_assertion() noexcept;
|
~critical_assertion() noexcept;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef NDEBUG
|
||||||
|
inline void
|
||||||
|
ircd::ctx::assert_critical()
|
||||||
|
{
|
||||||
|
// eliminated in non-debug mode.
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -915,12 +915,6 @@ ircd::ctx::assert_critical()
|
||||||
{
|
{
|
||||||
"%lu '%s' :Illegal context switch", id(), name()
|
"%lu '%s' :Illegal context switch", id(), name()
|
||||||
};
|
};
|
||||||
}
|
|
||||||
#else
|
|
||||||
void
|
|
||||||
ircd::ctx::assert_critical()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue