From c5c5fea2dd113a4235ad77db3a99071b036098a3 Mon Sep 17 00:00:00 2001 From: Matthew Pohlmann Date: Tue, 11 Jun 2019 23:17:41 -0700 Subject: [PATCH] Use VULKAN_HPP_ASSERT instead of assert (#332) * Use VULKAN_HPP_ASSERT instead of assert Update `DispatchLoaderDynamic::init(...)` to use the `VULKAN_HPP_ASSERT` macro instead of a plain `assert`. * Update vulkan.hpp --- VulkanHppGenerator.cpp | 4 ++-- vulkan/vulkan.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 1f6b5a0..ea22dfa 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -2380,8 +2380,8 @@ void VulkanHppGenerator::writeDispatchLoaderDynamic(std::ostream &os) // This interface does not require a linked vulkan library. void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr ) { - assert(instance && getInstanceProcAddr); - assert(!!device == !!getDeviceProcAddr); + VULKAN_HPP_ASSERT(instance && getInstanceProcAddr); + VULKAN_HPP_ASSERT(!!device == !!getDeviceProcAddr); vkGetInstanceProcAddr = getInstanceProcAddr; vkGetDeviceProcAddr = getDeviceProcAddr ? getDeviceProcAddr : PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr") ); )"; diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 8a1fb3d..fce34e3 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -56934,8 +56934,8 @@ namespace VULKAN_HPP_NAMESPACE // This interface does not require a linked vulkan library. void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr ) { - assert(instance && getInstanceProcAddr); - assert(!!device == !!getDeviceProcAddr); + VULKAN_HPP_ASSERT(instance && getInstanceProcAddr); + VULKAN_HPP_ASSERT(!!device == !!getDeviceProcAddr); vkGetInstanceProcAddr = getInstanceProcAddr; vkGetDeviceProcAddr = getDeviceProcAddr ? getDeviceProcAddr : PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr") ); vkCreateInstance = PFN_vkCreateInstance( vkGetInstanceProcAddr( instance, "vkCreateInstance" ) );