diff --git a/common/video/vulkan/slang_preset.cpp b/common/video/vulkan/slang_preset.cpp index 69362ae2..69cb4143 100644 --- a/common/video/vulkan/slang_preset.cpp +++ b/common/video/vulkan/slang_preset.cpp @@ -19,14 +19,6 @@ using std::string; using std::to_string; -SlangPreset::SlangPreset() -{ -} - -SlangPreset::~SlangPreset() -{ -} - bool SlangPreset::load_preset_file(string filename) { if (!ends_with(filename, ".slangp")) diff --git a/common/video/vulkan/slang_preset.hpp b/common/video/vulkan/slang_preset.hpp index caa32520..d9ed29b6 100644 --- a/common/video/vulkan/slang_preset.hpp +++ b/common/video/vulkan/slang_preset.hpp @@ -7,9 +7,6 @@ struct SlangPreset { - SlangPreset(); - ~SlangPreset(); - void print(); bool load_preset_file(std::string filename); bool introspect(); diff --git a/common/video/vulkan/slang_preset_ini.cpp b/common/video/vulkan/slang_preset_ini.cpp index 11d0fd88..13654634 100644 --- a/common/video/vulkan/slang_preset_ini.cpp +++ b/common/video/vulkan/slang_preset_ini.cpp @@ -4,14 +4,6 @@ #include #include -IniFile::IniFile() -{ -} - -IniFile::~IniFile() -{ -} - static std::string trim_comments(std::string str) { for (auto &comment : { "//", "#" }) diff --git a/common/video/vulkan/slang_preset_ini.hpp b/common/video/vulkan/slang_preset_ini.hpp index 3a20b13c..df549e4e 100644 --- a/common/video/vulkan/slang_preset_ini.hpp +++ b/common/video/vulkan/slang_preset_ini.hpp @@ -4,8 +4,6 @@ struct IniFile { - IniFile(); - ~IniFile(); bool load_file(std::string filename); std::string get_string(std::string key, std::string default_string); int get_int(std::string key, int default_int); diff --git a/common/video/vulkan/slang_shader.cpp b/common/video/vulkan/slang_shader.cpp index 1b01cf3a..22fef343 100644 --- a/common/video/vulkan/slang_shader.cpp +++ b/common/video/vulkan/slang_shader.cpp @@ -14,15 +14,6 @@ using std::string; using std::vector; -SlangShader::SlangShader() -{ - ubo_size = 0; -} - -SlangShader::~SlangShader() -{ -} - /* Recursively load shader file and included files into memory, applying #include and #pragma directives. Will strip all directives except diff --git a/common/video/vulkan/slang_shader.hpp b/common/video/vulkan/slang_shader.hpp index 6e24bcd8..557d4345 100644 --- a/common/video/vulkan/slang_shader.hpp +++ b/common/video/vulkan/slang_shader.hpp @@ -65,9 +65,6 @@ struct SlangShader Fragment }; - SlangShader(); - ~SlangShader(); - bool preprocess_shader_file(std::string filename, std::vector &lines); void set_base_path(std::string filename); bool load_file(std::string new_filename = ""); diff --git a/common/video/vulkan/vulkan_pipeline_image.cpp b/common/video/vulkan/vulkan_pipeline_image.cpp index 69882b88..b48c479e 100644 --- a/common/video/vulkan/vulkan_pipeline_image.cpp +++ b/common/video/vulkan/vulkan_pipeline_image.cpp @@ -7,18 +7,6 @@ namespace Vulkan { -PipelineImage::PipelineImage() -{ - image_width = 0; - image_height = 0; - device = nullptr; - command_pool = nullptr; - allocator = nullptr; - queue = nullptr; - image = nullptr; - current_layout = vk::ImageLayout::eUndefined; -} - PipelineImage::~PipelineImage() { destroy(); diff --git a/common/video/vulkan/vulkan_pipeline_image.hpp b/common/video/vulkan/vulkan_pipeline_image.hpp index ffd8f705..73237fde 100644 --- a/common/video/vulkan/vulkan_pipeline_image.hpp +++ b/common/video/vulkan/vulkan_pipeline_image.hpp @@ -6,7 +6,7 @@ namespace Vulkan struct PipelineImage { - PipelineImage(); + PipelineImage() = default; void init(vk::Device device, vk::CommandPool command, vk::Queue queue, vma::Allocator allocator); void init(Vulkan::Context *context); ~PipelineImage(); diff --git a/common/video/vulkan/vulkan_slang_pipeline.cpp b/common/video/vulkan/vulkan_slang_pipeline.cpp index 09750df2..80398daf 100644 --- a/common/video/vulkan/vulkan_slang_pipeline.cpp +++ b/common/video/vulkan/vulkan_slang_pipeline.cpp @@ -65,18 +65,6 @@ vk::SamplerAddressMode wrap_mode_from_string(std::string s) return vk::SamplerAddressMode::eClampToBorder; } -SlangPipeline::SlangPipeline() -{ - device = nullptr; - shader = nullptr; - uniform_buffer = nullptr; - uniform_buffer_allocation = nullptr; - source_width = 0; - source_height = 0; - destination_width = 0; - destination_height = 0; -} - void SlangPipeline::init(Context *context_, SlangShader *shader_) { this->context = context_; diff --git a/common/video/vulkan/vulkan_slang_pipeline.hpp b/common/video/vulkan/vulkan_slang_pipeline.hpp index d4fd473c..5c76ecb4 100644 --- a/common/video/vulkan/vulkan_slang_pipeline.hpp +++ b/common/video/vulkan/vulkan_slang_pipeline.hpp @@ -10,7 +10,7 @@ namespace Vulkan class SlangPipeline { public: - SlangPipeline(); + SlangPipeline() = default; void init(Context *context_, SlangShader *shader_); ~SlangPipeline(); diff --git a/common/video/vulkan/vulkan_swapchain.cpp b/common/video/vulkan/vulkan_swapchain.cpp index f89c2abf..998291a8 100644 --- a/common/video/vulkan/vulkan_swapchain.cpp +++ b/common/video/vulkan/vulkan_swapchain.cpp @@ -12,7 +12,6 @@ Swapchain::Swapchain(Context &context_) command_pool(context.command_pool.get()), surface(context.surface.get()) { - end_render_pass_function = nullptr; } Swapchain::~Swapchain() diff --git a/common/video/vulkan/vulkan_swapchain.hpp b/common/video/vulkan/vulkan_swapchain.hpp index 7cbd5c0c..a304b98e 100644 --- a/common/video/vulkan/vulkan_swapchain.hpp +++ b/common/video/vulkan/vulkan_swapchain.hpp @@ -41,7 +41,7 @@ class Swapchain vk::RenderPass &get_render_pass(); private: - std::function end_render_pass_function; + std::function end_render_pass_function = nullptr; void create_render_pass(); struct Frame @@ -79,11 +79,11 @@ class Swapchain std::vector image_data; Vulkan::Context &context; - vk::SurfaceKHR &surface; vk::Device &device; - vk::CommandPool &command_pool; - vk::PhysicalDevice &physical_device; vk::Queue &queue; + vk::PhysicalDevice &physical_device; + vk::CommandPool &command_pool; + vk::SurfaceKHR &surface; }; } // namespace Vulkan \ No newline at end of file diff --git a/common/video/vulkan/vulkan_texture.cpp b/common/video/vulkan/vulkan_texture.cpp index d3e091de..b1e0740b 100644 --- a/common/video/vulkan/vulkan_texture.cpp +++ b/common/video/vulkan/vulkan_texture.cpp @@ -7,20 +7,6 @@ namespace Vulkan { -Texture::Texture() -{ - image_width = 0; - image_height = 0; - buffer_size = 0; - device = nullptr; - command_pool = nullptr; - allocator = nullptr; - queue = nullptr; - buffer = nullptr; - image = nullptr; - sampler = nullptr; -} - Texture::~Texture() { destroy(); diff --git a/common/video/vulkan/vulkan_texture.hpp b/common/video/vulkan/vulkan_texture.hpp index 91c63f41..fefe82f1 100644 --- a/common/video/vulkan/vulkan_texture.hpp +++ b/common/video/vulkan/vulkan_texture.hpp @@ -7,7 +7,7 @@ namespace Vulkan struct Texture { - Texture(); + Texture() = default; void init(vk::Device device, vk::CommandPool command, vk::Queue queue, vma::Allocator allocator); void init(Context *context); ~Texture();