diff --git a/Bigfoot/Sources/Engine/Include/Engine/EngineAssertHandler.hpp b/Bigfoot/Sources/Engine/Include/Engine/EngineAssertHandler.hpp index c2b92b4..fecdd3d 100644 --- a/Bigfoot/Sources/Engine/Include/Engine/EngineAssertHandler.hpp +++ b/Bigfoot/Sources/Engine/Include/Engine/EngineAssertHandler.hpp @@ -33,23 +33,20 @@ class EngineAssertHandler * Handle an assertion. * * \param p_location Location of the assertion. - * \param p_stacktrace The stack trace * \param p_format Format string for the assertion message. * \param p_args Arguments for the format string. */ template static void Handle(const std::source_location& p_location, - const std::string_view p_stacktrace, std::format_string p_format, ARGS&&... p_args) { BIGFOOT_LOG_FATAL(ENGINE_LOGGER, - "Assert: {} (File:{}, Line:{}, Function:{}\n{}", + "Assert: {} (File:{}, Line:{}, Function:{}\n", std::format(p_format, std::forward(p_args)...), p_location.file_name(), p_location.line(), - p_location.function_name(), - p_stacktrace); + p_location.function_name()); } EngineAssertHandler& operator=(const EngineAssertHandler& p_handler) = delete; diff --git a/Bigfoot/Sources/System/Include/System/SystemAssertHandler.hpp b/Bigfoot/Sources/System/Include/System/SystemAssertHandler.hpp index 8840b50..9d0c56d 100644 --- a/Bigfoot/Sources/System/Include/System/SystemAssertHandler.hpp +++ b/Bigfoot/Sources/System/Include/System/SystemAssertHandler.hpp @@ -33,23 +33,20 @@ class SystemAssertHandler * Handle an assertion. * * \param p_location Location of the assertion. - * \param p_stacktrace The stack trace * \param p_format Format string for the assertion message. * \param p_args Arguments for the format string. */ template static void Handle(const std::source_location& p_location, - const std::string_view p_stacktrace, std::format_string p_format, ARGS&&... p_args) { BIGFOOT_LOG_FATAL(SYSTEM_LOGGER, - "Assert: {} (File:{}, Line:{}, Function:{}\n{}", + "Assert: {} (File:{}, Line:{}, Function:{}\n", std::format(p_format, std::forward(p_args)...), p_location.file_name(), p_location.line(), - p_location.function_name(), - p_stacktrace); + p_location.function_name()); } SystemAssertHandler& operator=(const SystemAssertHandler& p_handler) = delete; diff --git a/Bigfoot/Sources/Utils/CMakeLists.txt b/Bigfoot/Sources/Utils/CMakeLists.txt index fe14a29..39cebc8 100644 --- a/Bigfoot/Sources/Utils/CMakeLists.txt +++ b/Bigfoot/Sources/Utils/CMakeLists.txt @@ -2,7 +2,6 @@ get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME) project(${PackageName}) set(PublicDependencies - $<$:cpptrace::cpptrace> unordered_dense::unordered_dense) set(PrivateDependencies) set(BigfootPublicDependencies) diff --git a/Bigfoot/Sources/Utils/Include/Utils/Assert.hpp b/Bigfoot/Sources/Utils/Include/Utils/Assert.hpp index 69975ec..ee2270b 100644 --- a/Bigfoot/Sources/Utils/Include/Utils/Assert.hpp +++ b/Bigfoot/Sources/Utils/Include/Utils/Assert.hpp @@ -10,8 +10,6 @@ #if defined BIGFOOT_NOT_OPTIMIZED -#include - #include #include @@ -39,13 +37,7 @@ 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(); \ - }; \ - \ - HANDLER::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \ + HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \ BREAK; \ } \ } while (false) @@ -56,13 +48,7 @@ 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(); \ - }; \ - \ - HANDLER::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \ + HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \ BREAK; \ } \ } while (false) @@ -73,13 +59,7 @@ 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(); \ - }; \ - \ - HANDLER::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \ + HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \ if (Bigfoot::Singleton::HasInstance()) \ { \ Bigfoot::Singleton::Instance().Flush(); \ diff --git a/CMake/FindDependencies.cmake b/CMake/FindDependencies.cmake index 09b0956..6ba0ef1 100644 --- a/CMake/FindDependencies.cmake +++ b/CMake/FindDependencies.cmake @@ -25,13 +25,10 @@ endif() if(${IS_MULTI_CONFIG}) find_package(quill REQUIRED) - find_package(cpptrace REQUIRED) elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo") find_package(quill REQUIRED) - find_package(cpptrace REQUIRED) endif() - find_package(glm REQUIRED) find_package(lodepng REQUIRED) find_package(imgui REQUIRED) diff --git a/conanfile.py b/conanfile.py index 812686e..d3e72ab 100644 --- a/conanfile.py +++ b/conanfile.py @@ -64,14 +64,12 @@ class Bigfoot(ConanFile): self.requires("mimalloc/3.2.8@bigfootdev/main", transitive_headers=True) self.requires("stduuid/1.2.3@bigfootdev/main", transitive_headers=True) self.requires("sqlite3/3.51.2@bigfootdev/main", transitive_headers=True) - self.requires("cli11/2.6.1@bigfootdev/main") self.requires("rapidhash/3.0@bigfootdev/main", transitive_headers=True) self.requires("effolkronium-random/1.5.0", transitive_headers=True) self.requires("flatbuffers/25.12.19@bigfootdev/main", transitive_headers=True) if(self.settings.build_type == "RelWithDebInfo" or self.settings.build_type == "Debug"): self.requires("quill/11.0.2", transitive_headers=True) - self.requires("cpptrace/1.0.4", transitive_headers=True) if(self.options.tracy): self.requires("tracy/0.13.1", transitive_headers=True)