From d67c041df1b4ebef173ccfa391b59a953f4c395b Mon Sep 17 00:00:00 2001 From: Romain BOULLARD Date: Sun, 22 Feb 2026 00:57:35 +0100 Subject: [PATCH] Multiple typos --- Bin2CPP/Sources/Bin2CPPLib/Include/Assert.hpp | 36 +++++++++---------- Bin2CPP/Sources/Bin2CPPLib/Include/Log.hpp | 4 +-- .../Sources/Bin2CPPLib/Include/Singleton.hpp | 4 +-- Bin2CPP/Tests/Bin2CPPLib/Log.cpp | 3 ++ ConanProfiles/clang | 2 +- ConanProfiles/clang_coverage | 4 +-- ConanProfiles/clangd | 4 +-- ConanProfiles/msvc | 2 +- ConanProfiles/msvcd | 2 +- 9 files changed, 30 insertions(+), 31 deletions(-) diff --git a/Bin2CPP/Sources/Bin2CPPLib/Include/Assert.hpp b/Bin2CPP/Sources/Bin2CPPLib/Include/Assert.hpp index 224308d..cd07ce1 100644 --- a/Bin2CPP/Sources/Bin2CPPLib/Include/Assert.hpp +++ b/Bin2CPP/Sources/Bin2CPPLib/Include/Assert.hpp @@ -45,7 +45,7 @@ class AssertHandler std::format_string 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(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::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::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::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::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::HasInstance()) \ { \ Bin2CPP::Singleton::Instance().Flush(); \ diff --git a/Bin2CPP/Sources/Bin2CPPLib/Include/Log.hpp b/Bin2CPP/Sources/Bin2CPPLib/Include/Log.hpp index 4e90d38..16f2a57 100644 --- a/Bin2CPP/Sources/Bin2CPPLib/Include/Log.hpp +++ b/Bin2CPP/Sources/Bin2CPPLib/Include/Log.hpp @@ -11,7 +11,7 @@ #include -#ifdef BIGFOOT_WINDOWS +#ifdef BIN2CPP_WINDOWS #pragma warning(disable: 4702) #endif #include @@ -19,7 +19,7 @@ #include #include #include -#if defined BIGFOOT_WINDOWS +#if defined BIN2CPP_WINDOWS #pragma warning(default: 4702) #endif diff --git a/Bin2CPP/Sources/Bin2CPPLib/Include/Singleton.hpp b/Bin2CPP/Sources/Bin2CPPLib/Include/Singleton.hpp index 3fc8f3b..4f1a037 100644 --- a/Bin2CPP/Sources/Bin2CPPLib/Include/Singleton.hpp +++ b/Bin2CPP/Sources/Bin2CPPLib/Include/Singleton.hpp @@ -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(); } diff --git a/Bin2CPP/Tests/Bin2CPPLib/Log.cpp b/Bin2CPP/Tests/Bin2CPPLib/Log.cpp index 17f609f..c6177f1 100644 --- a/Bin2CPP/Tests/Bin2CPPLib/Log.cpp +++ b/Bin2CPP/Tests/Bin2CPPLib/Log.cpp @@ -8,6 +8,8 @@ #include +#include + namespace Bin2CPP { class LogFixture: public ::testing::Test @@ -36,6 +38,7 @@ TEST_F(LogFixture, LogDebug) TEST_F(LogFixture, LogTrace) { Singleton::Lifetime singletonLifetime; + BIN2CPP_LOG_TRACE("Hello"); } diff --git a/ConanProfiles/clang b/ConanProfiles/clang index a7ea222..e571591 100644 --- a/ConanProfiles/clang +++ b/ConanProfiles/clang @@ -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 diff --git a/ConanProfiles/clang_coverage b/ConanProfiles/clang_coverage index c156ac5..81c685d 100644 --- a/ConanProfiles/clang_coverage +++ b/ConanProfiles/clang_coverage @@ -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 diff --git a/ConanProfiles/clangd b/ConanProfiles/clangd index 8050768..1eb8657 100644 --- a/ConanProfiles/clangd +++ b/ConanProfiles/clangd @@ -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 diff --git a/ConanProfiles/msvc b/ConanProfiles/msvc index 08132fa..1cc7cdf 100644 --- a/ConanProfiles/msvc +++ b/ConanProfiles/msvc @@ -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"] diff --git a/ConanProfiles/msvcd b/ConanProfiles/msvcd index 1af6884..b184b6a 100644 --- a/ConanProfiles/msvcd +++ b/ConanProfiles/msvcd @@ -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"]