Multiple typos
All checks were successful
Bin2CPP / Build & Test Debug (push) Successful in 1m0s
Bin2CPP / Build & Test RelWithDebInfo (push) Successful in 1m13s
Bin2CPP / Clang Format Checks (push) Successful in 8s
Bin2CPP / Build & Test Release (push) Successful in 40s

This commit is contained in:
2026-02-22 00:57:35 +01:00
parent 5e06848610
commit 42804dccb7
11 changed files with 32 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
name: Bigfoot name: Bin2CPP
on: on:
push: push:

View File

@@ -1,4 +1,4 @@
name: Bigfoot name: Bin2CPP
on: on:
push: push:

View File

@@ -45,7 +45,7 @@ class AssertHandler
std::format_string<ARGS...> p_format, std::format_string<ARGS...> p_format,
ARGS&&... p_args) 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)...), std::format(p_format, std::forward<ARGS>(p_args)...),
p_location.file_name(), p_location.file_name(),
p_location.line(), p_location.line(),
@@ -78,13 +78,13 @@ class AssertHandler
constexpr std::source_location location = std::source_location::current(); \ constexpr std::source_location location = std::source_location::current(); \
if (!(p_assert)) [[unlikely]] \ 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(); \ Bin2CPP::Singleton<Bin2CPP::Log>::Instance().Flush(); \
return stacktrace.to_string(); \ } \
}; \
\
Bin2CPP::AssertHandler::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
BIN2CPP_BREAK; \ BIN2CPP_BREAK; \
} \ } \
} while (false) } while (false)
@@ -95,13 +95,13 @@ class AssertHandler
constexpr std::source_location location = std::source_location::current(); \ constexpr std::source_location location = std::source_location::current(); \
if (!(p_assert)) [[unlikely]] \ 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(); \ Bin2CPP::Singleton<Bin2CPP::Log>::Instance().Flush(); \
return stacktrace.to_string(); \ } \
}; \
\
Bin2CPP::AssertHandler::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
BIN2CPP_BREAK; \ BIN2CPP_BREAK; \
} \ } \
} while (false) } while (false)
@@ -112,13 +112,9 @@ class AssertHandler
constexpr std::source_location location = std::source_location::current(); \ constexpr std::source_location location = std::source_location::current(); \
if (!(p_assert)) [[unlikely]] \ if (!(p_assert)) [[unlikely]] \
{ \ { \
constexpr auto stacktrace = []() -> std::string \ Bin2CPP::AssertHandler::Handle(location, \
{ \ cpptrace::generate_trace().to_string(), \
const cpptrace::stacktrace stacktrace = cpptrace::generate_trace(); \ p_message __VA_OPT__(, ) __VA_ARGS__); \
return stacktrace.to_string(); \
}; \
\
Bin2CPP::AssertHandler::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
if (Bin2CPP::Singleton<Bin2CPP::Log>::HasInstance()) \ if (Bin2CPP::Singleton<Bin2CPP::Log>::HasInstance()) \
{ \ { \
Bin2CPP::Singleton<Bin2CPP::Log>::Instance().Flush(); \ Bin2CPP::Singleton<Bin2CPP::Log>::Instance().Flush(); \

View File

@@ -11,7 +11,7 @@
#include <EASTL/array.h> #include <EASTL/array.h>
#ifdef BIGFOOT_WINDOWS #ifdef BIN2CPP_WINDOWS
#pragma warning(disable: 4702) #pragma warning(disable: 4702)
#endif #endif
#include <quill/Backend.h> #include <quill/Backend.h>
@@ -19,7 +19,7 @@
#include <quill/LogMacros.h> #include <quill/LogMacros.h>
#include <quill/Logger.h> #include <quill/Logger.h>
#include <quill/sinks/ConsoleSink.h> #include <quill/sinks/ConsoleSink.h>
#if defined BIGFOOT_WINDOWS #if defined BIN2CPP_WINDOWS
#pragma warning(default: 4702) #pragma warning(default: 4702)
#endif #endif

View File

@@ -26,7 +26,7 @@ class Singleton
* *
* \return The instance * \return The instance
*/ */
static constexpr TYPE& Instance() static TYPE& Instance()
{ {
return ms_instance.value(); return ms_instance.value();
} }
@@ -36,7 +36,7 @@ class Singleton
* *
* \return True if initialized, false otherwise * \return True if initialized, false otherwise
*/ */
static constexpr bool HasInstance() static bool HasInstance()
{ {
return ms_instance.has_value(); return ms_instance.has_value();
} }

View File

@@ -8,6 +8,8 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <Assert.hpp>
namespace Bin2CPP namespace Bin2CPP
{ {
class LogFixture: public ::testing::Test class LogFixture: public ::testing::Test
@@ -36,6 +38,7 @@ TEST_F(LogFixture, LogDebug)
TEST_F(LogFixture, LogTrace) TEST_F(LogFixture, LogTrace)
{ {
Singleton<Log>::Lifetime singletonLifetime; Singleton<Log>::Lifetime singletonLifetime;
BIN2CPP_LOG_TRACE("Hello"); BIN2CPP_LOG_TRACE("Hello");
} }

View File

@@ -11,7 +11,7 @@ build_type=Release
[conf] [conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} 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:mode=install
tools.system.package_manager:sudo=True tools.system.package_manager:sudo=True

View File

@@ -11,8 +11,8 @@ build_type=Debug
[conf] [conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} 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_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 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 Bin2CPP', 'force': True}}
tools.system.package_manager:mode=install tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True tools.system.package_manager:sudo=True

View File

@@ -11,8 +11,8 @@ build_type=Debug
[conf] [conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} 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_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 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 Bin2CPP', 'force': True}}
tools.system.package_manager:mode=install tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True tools.system.package_manager:sudo=True

View File

@@ -9,7 +9,7 @@ compiler.runtime=static
build_type=Release build_type=Release
[conf] [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.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
tools.build:exelinkflags=["/LTCG", "/INCREMENTAL:NO"] tools.build:exelinkflags=["/LTCG", "/INCREMENTAL:NO"]

View File

@@ -9,7 +9,7 @@ compiler.runtime=static
build_type=Debug build_type=Debug
[conf] [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.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
tools.build:exelinkflags=["/INCREMENTAL:NO"] tools.build:exelinkflags=["/INCREMENTAL:NO"]