refactor: fix some static analysis errors

This commit is contained in:
light7734 2025-10-16 13:53:21 +03:30
parent 3066153d6c
commit bd8a111607
4 changed files with 12 additions and 17 deletions

View file

@ -10,15 +10,16 @@ Pass::Pass(
const lt::assets::ShaderAsset &vertex_shader, const lt::assets::ShaderAsset &vertex_shader,
const lt::assets::ShaderAsset &fragment_shader const lt::assets::ShaderAsset &fragment_shader
) )
: m_device(static_cast<Device *>(device)), m_layout(m_device->create_pipeline_layout( : m_device(static_cast<Device *>(device))
VkPipelineLayoutCreateInfo { , m_layout(m_device->create_pipeline_layout(
.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, VkPipelineLayoutCreateInfo {
.setLayoutCount = 0u, .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
.pSetLayouts = nullptr, .setLayoutCount = 0u,
.pushConstantRangeCount = 0u, .pSetLayouts = nullptr,
.pPushConstantRanges = nullptr, .pushConstantRangeCount = 0u,
} .pPushConstantRanges = nullptr,
)) }
))
{ {
auto *vertex_module = create_module( auto *vertex_module = create_module(
vertex_shader.unpack(lt::assets::ShaderAsset::BlobTag::code) vertex_shader.unpack(lt::assets::ShaderAsset::BlobTag::code)
@ -111,7 +112,6 @@ Pass::Pass(
.blendConstants = { 0.0f, 0.0, 0.0, 0.0 }, .blendConstants = { 0.0f, 0.0, 0.0, 0.0 },
}; };
auto attachment_description = VkAttachmentDescription { auto attachment_description = VkAttachmentDescription {
.format = static_cast<Swapchain *>(swapchain)->get_format(), .format = static_cast<Swapchain *>(swapchain)->get_format(),

View file

@ -46,8 +46,7 @@ System::System(CreateInfo info)
) }; ) };
} }
System::~System() System::~System() = default;
= default;
void System::on_register() void System::on_register()
{ {

View file

@ -14,7 +14,6 @@
#include <cfenv> #include <cfenv>
#include <cfloat> #include <cfloat>
#include <cinttypes> #include <cinttypes>
#include <ciso646>
#include <climits> #include <climits>
#include <clocale> #include <clocale>
#include <cmath> #include <cmath>

View file

@ -4,10 +4,7 @@
namespace lt::surface { namespace lt::surface {
System::System( System::System(memory::Ref<ecs::Registry> registry, memory::Ref<app::EventMediator> event_mediator)
memory::Ref<ecs::Registry> registry,
memory::Ref<app::EventMediator> event_mediator
)
: m_registry(std::move(registry)) : m_registry(std::move(registry))
, m_event_mediator(std::move(event_mediator)) , m_event_mediator(std::move(event_mediator))
{ {