debug: remove nullary panic function

panic without message tended to promote useless console output. if it's
worth panicing over it's worth writing a oneliner.
This commit is contained in:
Danny Robson 2016-04-19 14:50:13 +10:00
parent 3a6faca98f
commit 568af11a0a
2 changed files with 2 additions and 10 deletions

View File

@ -68,7 +68,7 @@
#define CHECK(C) do { \
DEBUG_ONLY( \
if (!(C)) \
panic (); \
panic (#C); \
); \
} while (0)
@ -273,7 +273,6 @@
///////////////////////////////////////////////////////////////////////////////
constexpr void panic [[noreturn]] (const char*);
constexpr void panic [[noreturn]] (void);
template <typename ...Args>
constexpr void panic [[noreturn]] (const char *fmt, const Args&...);

View File

@ -83,13 +83,6 @@ constexpr void unreachable [[noreturn]] (const char *msg)
///////////////////////////////////////////////////////////////////////////////
constexpr void panic [[noreturn]] (void)
{
panic ("nfi");
}
//-----------------------------------------------------------------------------
constexpr void panic [[noreturn]] (const char *msg)
{
! msg
@ -105,6 +98,6 @@ void
panic [[noreturn]] (const char *fmt, const Args& ...args)
{
! fmt
? panic ()
? panic ("unreachable constexpr panic helper")
: util::debug::detail::panic (fmt, args...);
}