[samples] Add missing explicit casts

This commit is contained in:
mocabe
2020-03-20 03:59:14 +09:00
parent 2f4ca1d168
commit 62667a6b4b
3 changed files with 6 additions and 6 deletions

View File

@@ -656,7 +656,7 @@ int main(int /*argc*/, char** /*argv*/)
// Create Window Surface (using glfw)
vk::SurfaceKHR surface;
VkResult err = glfwCreateWindowSurface(*instance, window, nullptr, reinterpret_cast<VkSurfaceKHR*>(&surface));
VkResult err = glfwCreateWindowSurface(VkInstance(*instance), window, nullptr, reinterpret_cast<VkSurfaceKHR*>(&surface));
check_vk_result(err);
std::pair<uint32_t, uint32_t> graphicsAndPresentQueueFamilyIndex = vk::su::findGraphicsAndPresentQueueFamilyIndex(physicalDevice, surface);
@@ -1063,7 +1063,7 @@ int main(int /*argc*/, char** /*argv*/)
// Cleanup
device->waitIdle();
swapChainData.swapChain.reset(); // need to reset swapChain before destroying the surface !
VULKAN_HPP_DEFAULT_DISPATCHER.vkDestroySurfaceKHR(*instance, surface, nullptr);
VULKAN_HPP_DEFAULT_DISPATCHER.vkDestroySurfaceKHR(VkInstance(*instance), VkSurfaceKHR(surface), nullptr);
glfwDestroyWindow(window);
glfwTerminate();
}