Cleanup more warnings and bad code

This commit is contained in:
2025-09-29 05:30:22 -04:00
parent 082d1e8c88
commit 2a5a526b07
75 changed files with 448 additions and 632 deletions

View File

@@ -28,7 +28,7 @@ namespace fgl::engine::components
}
}
TransformComponent::TransformComponent()
TransformComponent::TransformComponent() : m_transform()
{}
TransformComponent::TransformComponent( const WorldTransform& transform ) : m_transform( transform )

View File

@@ -7,6 +7,7 @@
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wuseless-cast"
#include <backends/imgui_impl_glfw.h>
#include <backends/imgui_impl_vulkan.h>
@@ -50,26 +51,28 @@ namespace fgl::editor
ImGui_ImplGlfw_InitForVulkan( window.window(), true );
ImGui_ImplVulkan_InitInfo init_info {
.ApiVersion = VK_API_VERSION_1_4,
.Instance = device.instance(),
.PhysicalDevice = *device.phyDevice().handle(),
.Device = *device,
.QueueFamily = device.phyDevice().queueInfo().getIndex( vk::QueueFlagBits::eGraphics ),
.Queue = *device.graphicsQueue(),
.DescriptorPool = *DescriptorPool::getInstance().getPool(),
.RenderPass = VK_NULL_HANDLE,
.DescriptorPoolSize = 0,
.MinImageCount = 2,
.ImageCount = 2,
.MSAASamples = VK_SAMPLE_COUNT_1_BIT,
.PipelineCache = VK_NULL_HANDLE,
.RenderPass = VK_NULL_HANDLE,
.Subpass = 0,
.MSAASamples = VK_SAMPLE_COUNT_1_BIT,
.UseDynamicRendering = VK_TRUE,
.PipelineRenderingCreateInfo = pipeline_info,
.Allocator = VK_NULL_HANDLE,
.CheckVkResultFn = VK_NULL_HANDLE,
.MinAllocationSize = 1024 * 1024
.MinAllocationSize = 1024 * 1024,
};
ImGui_ImplVulkan_Init( &init_info );

View File

@@ -8,6 +8,7 @@
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wuseless-cast"
#include <imgui_internal.h> // Included for DockBuilder since it's not exposed yet
#pragma GCC diagnostic pop
@@ -15,7 +16,6 @@
#include "FileBrowser.hpp"
#include "engine/assets/model/Model.hpp"
#include "engine/debug/DEBUG_NAMES.hpp"
#include "engine/descriptors/DescriptorPool.hpp"
#include "engine/rendering/Renderer.hpp"
#include "gui_window_names.hpp"
#include "safe_include.hpp"
@@ -96,9 +96,9 @@ namespace fgl::engine::gui
// ImGui::PopStyleVar();
}
static std::weak_ptr< GameObject > selected_object {};
static std::weak_ptr< GameObject > SELECTED_OBJECT {};
void itterateGameObjectNode( FrameInfo& info, OctTreeNode& node )
void itterateGameObjectNode( [[maybe_unused]] FrameInfo& info, [[maybe_unused]] OctTreeNode& node )
{
/*
if ( node.isLeaf() )
@@ -161,7 +161,7 @@ namespace fgl::engine::gui
if ( ImGui::Selectable( object->getName().c_str() ) )
{
selected_object = object;
SELECTED_OBJECT = object;
}
ImGui::PopID();
@@ -194,13 +194,13 @@ namespace fgl::engine::gui
ZoneScoped;
ImGui::Begin( ENTITY_INFO_NAME );
if ( selected_object.expired() )
if ( SELECTED_OBJECT.expired() )
{
ImGui::End();
return;
}
const auto object { selected_object.lock() };
const auto object { SELECTED_OBJECT.lock() };
drawObject( *object );
drawComponentsList( *object );