From de483670c46ac4b66f2dd625b7cd768aeaecb9f6 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 20 Jan 2016 16:38:01 +1100 Subject: [PATCH] debug: rename unusual to warn unusual is a stupid name --- debug.cpp | 20 ++++++++++++++++++-- debug.hpp | 6 +++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/debug.cpp b/debug.cpp index e180be9a..1bc93f99 100644 --- a/debug.cpp +++ b/debug.cpp @@ -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); } diff --git a/debug.hpp b/debug.hpp index 27449656..90d84854 100644 --- a/debug.hpp +++ b/debug.hpp @@ -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 *); ///////////////////////////////////////////////////////////////////////////////