Skip to content

Commit f614d66

Browse files
authored
Add missing static casts (#35)
* Add missing vk buffer static casts to Buffer.cpp * Add missing vk buffer static casts to ImguiManager.cpp
1 parent 8bc914a commit f614d66

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/vulkan/Buffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ void Buffer::downloadTo(std::shared_ptr<Buffer> buffer, vk::DeviceSize srcOffset
116116
}
117117

118118
Buffer::~Buffer() {
119-
vmaDestroyBuffer(context->allocator, buffer, allocation);
119+
vmaDestroyBuffer(context->allocator, static_cast<VkBuffer>(buffer), allocation);
120120
spdlog::debug("Buffer destroyed");
121121
}
122122

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

126126
size = newSize;
127127
alloc();

src/vulkan/ImguiManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void ImguiManager::init() {
127127
init_info.Device = context->device.get();
128128
init_info.QueueFamily = context->queues[VulkanContext::Queue::GRAPHICS].queueFamily;
129129
init_info.Queue = context->queues[VulkanContext::Queue::GRAPHICS].queue;
130-
init_info.DescriptorPool = descriptorPool.get();
130+
init_info.DescriptorPool = static_cast<VkDescriptorPool>(descriptorPool.get());
131131
init_info.MinImageCount = 2;
132132
init_info.ImageCount = swapchain->imageCount + 1;
133133
init_info.UseDynamicRendering = true;

0 commit comments

Comments
 (0)