From f614d6663f9e9bc5e142f7f7a8f612fe65868d76 Mon Sep 17 00:00:00 2001 From: niansa/tuxifan Date: Tue, 10 Sep 2024 17:56:58 +0100 Subject: [PATCH] Add missing static casts (#35) * Add missing vk buffer static casts to Buffer.cpp * Add missing vk buffer static casts to ImguiManager.cpp --- src/vulkan/Buffer.cpp | 4 ++-- src/vulkan/ImguiManager.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vulkan/Buffer.cpp b/src/vulkan/Buffer.cpp index 5228aa1..a55ada8 100644 --- a/src/vulkan/Buffer.cpp +++ b/src/vulkan/Buffer.cpp @@ -116,12 +116,12 @@ void Buffer::downloadTo(std::shared_ptr buffer, vk::DeviceSize srcOffset } Buffer::~Buffer() { - vmaDestroyBuffer(context->allocator, buffer, allocation); + vmaDestroyBuffer(context->allocator, static_cast(buffer), allocation); spdlog::debug("Buffer destroyed"); } void Buffer::realloc(uint64_t newSize) { - vmaDestroyBuffer(context->allocator, buffer, allocation); + vmaDestroyBuffer(context->allocator, static_cast(buffer), allocation); size = newSize; alloc(); diff --git a/src/vulkan/ImguiManager.cpp b/src/vulkan/ImguiManager.cpp index 76b0f01..7328daf 100644 --- a/src/vulkan/ImguiManager.cpp +++ b/src/vulkan/ImguiManager.cpp @@ -127,7 +127,7 @@ void ImguiManager::init() { init_info.Device = context->device.get(); init_info.QueueFamily = context->queues[VulkanContext::Queue::GRAPHICS].queueFamily; init_info.Queue = context->queues[VulkanContext::Queue::GRAPHICS].queue; - init_info.DescriptorPool = descriptorPool.get(); + init_info.DescriptorPool = static_cast(descriptorPool.get()); init_info.MinImageCount = 2; init_info.ImageCount = swapchain->imageCount + 1; init_info.UseDynamicRendering = true;