[*] Move #if defined(_AUHAS_FMT) around
This commit is contained in:
parent
0edf00ffc8
commit
1fc131e10a
@ -19,11 +19,11 @@ static inline void AU_NORETURN SysPanic(fmt::format_string<T...> msg, T&& ... ar
|
||||
if (Aurora::RuntimeHasStarted())
|
||||
{
|
||||
Aurora::Debug::AddMemoryCrunch();
|
||||
try
|
||||
AUROXTL_COMMODITY_TRY
|
||||
{
|
||||
Aurora::Logging::WriteLinef(static_cast<AuUInt8>(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal", msg, AuForward<T>(args)...);
|
||||
}
|
||||
catch (...)
|
||||
AUROXTL_COMMODITY_CATCH
|
||||
{
|
||||
|
||||
}
|
||||
@ -38,11 +38,11 @@ static inline void AU_NORETURN SysPanic2(AuUInt uLineHintInNonshipBinary,
|
||||
if (Aurora::RuntimeHasStarted())
|
||||
{
|
||||
Aurora::Debug::AddMemoryCrunch();
|
||||
try
|
||||
AUROXTL_COMMODITY_TRY
|
||||
{
|
||||
Aurora::Logging::WriteLinef(static_cast<AuUInt8>(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal", msg, AuForward<T>(args)...);
|
||||
}
|
||||
catch (...)
|
||||
AUROXTL_COMMODITY_CATCH
|
||||
{
|
||||
|
||||
}
|
||||
@ -50,28 +50,32 @@ static inline void AU_NORETURN SysPanic2(AuUInt uLineHintInNonshipBinary,
|
||||
Aurora::Debug::Panic2(uLineHintInNonshipBinary);
|
||||
}
|
||||
|
||||
template<typename ... T>
|
||||
static inline void AU_NORETURN SysPanic()
|
||||
{
|
||||
Aurora::Debug::Panic();
|
||||
}
|
||||
|
||||
template<typename ... T>
|
||||
static inline void AU_NORETURN SysPanic2(AuUInt uLineHintInNonshipBinary)
|
||||
{
|
||||
Aurora::Debug::Panic2(uLineHintInNonshipBinary);
|
||||
}
|
||||
|
||||
static inline AU_NORETURN void SysPanic(const char *pMsg)
|
||||
{
|
||||
SysPanic("{}", pMsg);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_AUHAS_FMT)
|
||||
template<typename ... T>
|
||||
#endif
|
||||
static inline void AU_NORETURN SysPanic()
|
||||
{
|
||||
Aurora::Debug::Panic();
|
||||
}
|
||||
|
||||
#if defined(_AUHAS_FMT)
|
||||
template<typename ... T>
|
||||
#endif
|
||||
static inline void AU_NORETURN SysPanic2(AuUInt uLineHintInNonshipBinary)
|
||||
{
|
||||
Aurora::Debug::Panic2(uLineHintInNonshipBinary);
|
||||
}
|
||||
|
||||
static inline AU_NORETURN void SysUnreachable_(int uLineHintInNonshipBinary)
|
||||
{
|
||||
Aurora::Debug::Panic2(uLineHintInNonshipBinary);
|
||||
}
|
||||
|
||||
#define SysUnreachable() SysUnreachable_(SysSafeLine)
|
||||
|
||||
#endif
|
@ -182,6 +182,8 @@ namespace Aurora::Logging
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(_AUHAS_FMT)
|
||||
|
||||
#define ADD_AU_GLOBAL_ALIAS(level)\
|
||||
template<typename ... T> \
|
||||
static void AuLog ## level(fmt::format_string<T...> line, T&& ... args) \
|
||||
@ -189,6 +191,17 @@ namespace Aurora::Logging
|
||||
Aurora::Logging::Log ## level(line, AuForward<T>(args)...); \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define ADD_AU_GLOBAL_ALIAS(level)\
|
||||
template<typename ... T> \
|
||||
static void AuLog ## level(const AuString &line, T&& ... args) \
|
||||
{ \
|
||||
Aurora::Logging::Log ## level(line); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ADD_AU_GLOBAL_ALIAS(Info)
|
||||
ADD_AU_GLOBAL_ALIAS(Dbg)
|
||||
ADD_AU_GLOBAL_ALIAS(Warn)
|
||||
|
Loading…
Reference in New Issue
Block a user