From f8baa7a6969fe5de7c8f9da8267b09ad9ec575aa Mon Sep 17 00:00:00 2001 From: spfuetzner Date: Mon, 13 Feb 2017 17:40:16 +0100 Subject: [PATCH] UniqueHandle- Fixed compile error in 32-bit Because in 32-bit Vulkan-handles are integers, the assignment from nullptr is not valid and doesn't compile. VK_NULL_HANDLE on the other hand abstracts the differences between 32- and 64-bit environments. --- VulkanHppGenerator.cpp | 2 +- vulkan/vulkan.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 7970c8d..c4ebb24 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -515,7 +515,7 @@ std::string const uniqueHandleHeader = { R"( Type release() { Type value = m_value; - m_value = nullptr; + m_value = VK_NULL_HANDLE; return value; } diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index f655d07..d4cf58c 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -397,7 +397,7 @@ namespace vk Type release() { Type value = m_value; - m_value = nullptr; + m_value = VK_NULL_HANDLE; return value; }