Skip to content

Commit

Permalink
Add missing static casts (#35)
Browse files Browse the repository at this point in the history
* Add missing vk buffer static casts to Buffer.cpp

* Add missing vk buffer static casts to ImguiManager.cpp
  • Loading branch information
niansa authored Sep 10, 2024
1 parent 8bc914a commit f614d66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/vulkan/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ void Buffer::downloadTo(std::shared_ptr<Buffer> buffer, vk::DeviceSize srcOffset
}

Buffer::~Buffer() {
vmaDestroyBuffer(context->allocator, buffer, allocation);
vmaDestroyBuffer(context->allocator, static_cast<VkBuffer>(buffer), allocation);
spdlog::debug("Buffer destroyed");
}

void Buffer::realloc(uint64_t newSize) {
vmaDestroyBuffer(context->allocator, buffer, allocation);
vmaDestroyBuffer(context->allocator, static_cast<VkBuffer>(buffer), allocation);

size = newSize;
alloc();
Expand Down
2 changes: 1 addition & 1 deletion src/vulkan/ImguiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<VkDescriptorPool>(descriptorPool.get());
init_info.MinImageCount = 2;
init_info.ImageCount = swapchain->imageCount + 1;
init_info.UseDynamicRendering = true;
Expand Down

0 comments on commit f614d66

Please sign in to comment.