refactor: fix some static analyzer errors
This commit is contained in:
parent
d5dc37d081
commit
3066153d6c
7 changed files with 12 additions and 18 deletions
|
|
@ -1,7 +1,2 @@
|
||||||
#include <asset_baker/bakers.hpp>
|
#include <asset_baker/bakers.hpp>
|
||||||
#include <test/test.hpp>
|
#include <test/test.hpp>
|
||||||
|
|
||||||
using ::lt::test::Case;
|
|
||||||
using ::lt::test::Suite;
|
|
||||||
|
|
||||||
// TODO(Light): add asset baking tests!
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ using lt::test::expect_unreachable;
|
||||||
using lt::test::Suite;
|
using lt::test::Suite;
|
||||||
|
|
||||||
using lt::test::expect_eq;
|
using lt::test::expect_eq;
|
||||||
using lt::test::expect_ne;
|
|
||||||
|
|
||||||
using lt::test::expect_false;
|
using lt::test::expect_false;
|
||||||
using lt::test::expect_true;
|
using lt::test::expect_true;
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,10 @@ void renderer_callback(
|
||||||
std::any &user_data
|
std::any &user_data
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
std::ignore = message_severity;
|
||||||
|
std::ignore = message_type;
|
||||||
|
std::ignore = user_data;
|
||||||
|
|
||||||
log_dbg("RENDERER CALLBACK: {}", data.message);
|
log_dbg("RENDERER CALLBACK: {}", data.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -204,7 +208,6 @@ public:
|
||||||
);
|
);
|
||||||
|
|
||||||
auto entity = ecs::Entity { m_editor_registry, m_window };
|
auto entity = ecs::Entity { m_editor_registry, m_window };
|
||||||
memory::Ref<app::SystemStats> system_stats = nullptr;
|
|
||||||
|
|
||||||
m_renderer_system = std::make_shared<renderer::System>(renderer::System::CreateInfo {
|
m_renderer_system = std::make_shared<renderer::System>(renderer::System::CreateInfo {
|
||||||
.config = { .target_api = renderer::Api::vulkan, .max_frames_in_flight = 3u },
|
.config = { .target_api = renderer::Api::vulkan, .max_frames_in_flight = 3u },
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
add_library_module(test test.cpp entrypoint.cpp)
|
add_library_module(test test.cpp entrypoint.cpp)
|
||||||
add_library_module(fuzz_test test.cpp fuzz.cpp)
|
add_library_module(fuzz_test test.cpp fuzz.cpp)
|
||||||
|
|
||||||
target_link_libraries(test PUBLIC tbb)
|
target_link_libraries(test PUBLIC tbb logger)
|
||||||
target_link_libraries(fuzz_test PUBLIC tbb)
|
target_link_libraries(fuzz_test PUBLIC tbb logger)
|
||||||
|
|
||||||
add_test_module(test test.test.cpp)
|
add_test_module(test test.test.cpp)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <logger/logger.hpp>
|
||||||
#include <test/test.hpp>
|
#include <test/test.hpp>
|
||||||
|
|
||||||
using namespace ::lt::test;
|
using namespace ::lt::test;
|
||||||
|
|
@ -84,14 +85,14 @@ try
|
||||||
}
|
}
|
||||||
catch (const std::exception &exp)
|
catch (const std::exception &exp)
|
||||||
{
|
{
|
||||||
std::println("Terminated due to uncaught exception:");
|
log_crt("Terminated due to uncaught exception:");
|
||||||
std::println("\twhat: {}", exp.what());
|
log_crt("\twhat: {}", exp.what());
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
std::println("Terminated due to uncaught non-std exception!");
|
log_crt("Terminated due to uncaught non-std exception!");
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
#include <ui/ui.hpp>
|
#include <ui/ui.hpp>
|
||||||
|
|
||||||
#ifdef LIGHT_PLATFORM_WINDOWS
|
#ifdef LIGHT_PLATFORM_WINDOWS
|
||||||
#include <renderer/dx/shared_context.hpp>
|
|
||||||
#include <renderer/dx/user_interface.hpp>
|
#include <renderer/dx/user_interface.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -14,7 +13,6 @@
|
||||||
#include <input/events/keyboard.hpp>
|
#include <input/events/keyboard.hpp>
|
||||||
#include <input/events/mouse.hpp>
|
#include <input/events/mouse.hpp>
|
||||||
#include <input/key_codes.hpp>
|
#include <input/key_codes.hpp>
|
||||||
#include <renderer/graphics_context.hpp>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -27,8 +25,7 @@ namespace lt {
|
||||||
|
|
||||||
UserInterface *UserInterface::s_context = nullptr;
|
UserInterface *UserInterface::s_context = nullptr;
|
||||||
|
|
||||||
auto UserInterface::create(memory::Ref<SharedContext> sharedContext)
|
auto UserInterface::create(memory::Ref<SharedContext> sharedContext) -> memory::Scope<UserInterface>
|
||||||
-> memory::Scope<UserInterface>
|
|
||||||
{
|
{
|
||||||
auto scopeUserInterface = memory::Scope<UserInterface> { nullptr };
|
auto scopeUserInterface = memory::Scope<UserInterface> { nullptr };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,7 @@ class SharedContext;
|
||||||
class UserInterface
|
class UserInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static auto create(memory::Ref<SharedContext> sharedContext)
|
static auto create(memory::Ref<SharedContext> sharedContext) -> memory::Scope<UserInterface>;
|
||||||
-> memory::Scope<UserInterface>;
|
|
||||||
|
|
||||||
static void dockspace_begin();
|
static void dockspace_begin();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue