Multiple typos
This commit is contained in:
@@ -45,7 +45,7 @@ class AssertHandler
|
||||
std::format_string<ARGS...> p_format,
|
||||
ARGS&&... p_args)
|
||||
{
|
||||
BIN2CPP_LOG_FATAL("Assert: {} (File:{}, Line:{}, Function:{}\n{}",
|
||||
BIN2CPP_LOG_FATAL("Assert: {} (File:{}, Line:{}, Function:{})\n{}",
|
||||
std::format(p_format, std::forward<ARGS>(p_args)...),
|
||||
p_location.file_name(),
|
||||
p_location.line(),
|
||||
@@ -78,13 +78,13 @@ class AssertHandler
|
||||
constexpr std::source_location location = std::source_location::current(); \
|
||||
if (!(p_assert)) [[unlikely]] \
|
||||
{ \
|
||||
constexpr auto stacktrace = []() -> std::string \
|
||||
Bin2CPP::AssertHandler::Handle(location, \
|
||||
cpptrace::generate_trace().to_string(), \
|
||||
p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
if (Bin2CPP::Singleton<Bin2CPP::Log>::HasInstance()) \
|
||||
{ \
|
||||
const cpptrace::stacktrace stacktrace = cpptrace::generate_trace(); \
|
||||
return stacktrace.to_string(); \
|
||||
}; \
|
||||
\
|
||||
Bin2CPP::AssertHandler::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
Bin2CPP::Singleton<Bin2CPP::Log>::Instance().Flush(); \
|
||||
} \
|
||||
BIN2CPP_BREAK; \
|
||||
} \
|
||||
} while (false)
|
||||
@@ -95,13 +95,13 @@ class AssertHandler
|
||||
constexpr std::source_location location = std::source_location::current(); \
|
||||
if (!(p_assert)) [[unlikely]] \
|
||||
{ \
|
||||
constexpr auto stacktrace = []() -> std::string \
|
||||
Bin2CPP::AssertHandler::Handle(location, \
|
||||
cpptrace::generate_trace().to_string(), \
|
||||
p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
if (Bin2CPP::Singleton<Bin2CPP::Log>::HasInstance()) \
|
||||
{ \
|
||||
const cpptrace::stacktrace stacktrace = cpptrace::generate_trace(); \
|
||||
return stacktrace.to_string(); \
|
||||
}; \
|
||||
\
|
||||
Bin2CPP::AssertHandler::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
Bin2CPP::Singleton<Bin2CPP::Log>::Instance().Flush(); \
|
||||
} \
|
||||
BIN2CPP_BREAK; \
|
||||
} \
|
||||
} while (false)
|
||||
@@ -112,13 +112,9 @@ class AssertHandler
|
||||
constexpr std::source_location location = std::source_location::current(); \
|
||||
if (!(p_assert)) [[unlikely]] \
|
||||
{ \
|
||||
constexpr auto stacktrace = []() -> std::string \
|
||||
{ \
|
||||
const cpptrace::stacktrace stacktrace = cpptrace::generate_trace(); \
|
||||
return stacktrace.to_string(); \
|
||||
}; \
|
||||
\
|
||||
Bin2CPP::AssertHandler::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
Bin2CPP::AssertHandler::Handle(location, \
|
||||
cpptrace::generate_trace().to_string(), \
|
||||
p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
if (Bin2CPP::Singleton<Bin2CPP::Log>::HasInstance()) \
|
||||
{ \
|
||||
Bin2CPP::Singleton<Bin2CPP::Log>::Instance().Flush(); \
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <EASTL/array.h>
|
||||
|
||||
#ifdef BIGFOOT_WINDOWS
|
||||
#ifdef BIN2CPP_WINDOWS
|
||||
#pragma warning(disable: 4702)
|
||||
#endif
|
||||
#include <quill/Backend.h>
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <quill/LogMacros.h>
|
||||
#include <quill/Logger.h>
|
||||
#include <quill/sinks/ConsoleSink.h>
|
||||
#if defined BIGFOOT_WINDOWS
|
||||
#if defined BIN2CPP_WINDOWS
|
||||
#pragma warning(default: 4702)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class Singleton
|
||||
*
|
||||
* \return The instance
|
||||
*/
|
||||
static constexpr TYPE& Instance()
|
||||
static TYPE& Instance()
|
||||
{
|
||||
return ms_instance.value();
|
||||
}
|
||||
@@ -36,7 +36,7 @@ class Singleton
|
||||
*
|
||||
* \return True if initialized, false otherwise
|
||||
*/
|
||||
static constexpr bool HasInstance()
|
||||
static bool HasInstance()
|
||||
{
|
||||
return ms_instance.has_value();
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <Assert.hpp>
|
||||
|
||||
namespace Bin2CPP
|
||||
{
|
||||
class LogFixture: public ::testing::Test
|
||||
@@ -36,6 +38,7 @@ TEST_F(LogFixture, LogDebug)
|
||||
TEST_F(LogFixture, LogTrace)
|
||||
{
|
||||
Singleton<Log>::Lifetime singletonLifetime;
|
||||
|
||||
BIN2CPP_LOG_TRACE("Hello");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user