debug: rename unusual to warn

unusual is a stupid name
This commit is contained in:
Danny Robson 2016-01-20 16:38:01 +11:00
parent 7cd20bb64d
commit de483670c4
2 changed files with 23 additions and 3 deletions

View File

@ -74,9 +74,25 @@ detail::unreachable (const char *msg)
////////////////////////////////////////////////////////////////////////////////
void
unusual (void)
warn (void)
{
panic ("Unusual code path found.");
warn ("Unusual code path found.");
}
//-----------------------------------------------------------------------------
void
warn (const std::string &msg)
{
warn (msg.c_str ());
}
//-----------------------------------------------------------------------------
void
warn (const char *msg)
{
LOG_WARN (msg);
}

View File

@ -304,7 +304,11 @@ constexpr void not_implemented [[noreturn]] (const char *msg);
constexpr void unreachable [[noreturn]] (void);
constexpr void unreachable [[noreturn]] (const char*);
void unusual (void);
///////////////////////////////////////////////////////////////////////////////
void warn (void);
void warn (const std::string&);
void warn (const char *);
///////////////////////////////////////////////////////////////////////////////