Multiple typos

This commit is contained in:
2026-02-22 00:57:35 +01:00
committed by Romain BOULLARD
parent d04876b18b
commit d67c041df1
9 changed files with 30 additions and 31 deletions

View File

@@ -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(); \

View File

@@ -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

View File

@@ -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();
}

View File

@@ -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");
}

View File

@@ -11,7 +11,7 @@ build_type=Release
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bin2CPP', 'force': True}}
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True

View File

@@ -11,8 +11,8 @@ build_type=Debug
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fprofile-instr-generate;-fcoverage-mapping', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_EXE_LINK_FLAGS': {'value': '-fprofile-instr-generate', 'cache': True, 'type': 'STRING', 'docstring': 'EXE link flags for Bigfoot', 'force': True}}
tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fprofile-instr-generate;-fcoverage-mapping', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bin2CPP', 'force': True}}
tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_EXE_LINK_FLAGS': {'value': '-fprofile-instr-generate', 'cache': True, 'type': 'STRING', 'docstring': 'EXE link flags for Bin2CPP', 'force': True}}
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True

View File

@@ -11,8 +11,8 @@ build_type=Debug
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fsanitize=address,undefined;-fno-sanitize-recover=all', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_EXE_LINK_FLAGS': {'value': '-fsanitize=address,undefined', 'cache': True, 'type': 'STRING', 'docstring': 'EXE link flags for Bigfoot', 'force': True}}
tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fsanitize=address,undefined;-fno-sanitize-recover=all', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bin2CPP', 'force': True}}
tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_EXE_LINK_FLAGS': {'value': '-fsanitize=address,undefined', 'cache': True, 'type': 'STRING', 'docstring': 'EXE link flags for Bin2CPP', 'force': True}}
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True

View File

@@ -9,7 +9,7 @@ compiler.runtime=static
build_type=Release
[conf]
tools.cmake.cmaketoolchain:extra_variables={'BIN2CPP_CXX_FLAGS': {'value': '/W4;/WX;', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
tools.cmake.cmaketoolchain:extra_variables={'BIN2CPP_CXX_FLAGS': {'value': '/W4;/WX;', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bin2CPP', 'force': True}}
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
tools.build:exelinkflags=["/LTCG", "/INCREMENTAL:NO"]

View File

@@ -9,7 +9,7 @@ compiler.runtime=static
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:extra_variables={'BIN2CPP_CXX_FLAGS': {'value': '/W4;/WX', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
tools.cmake.cmaketoolchain:extra_variables={'BIN2CPP_CXX_FLAGS': {'value': '/W4;/WX', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bin2CPP', 'force': True}}
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
tools.build:exelinkflags=["/INCREMENTAL:NO"]