From 1ff3da4a8275f83bf8a8c80f26e5aeb01804135f Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 21 Jul 2017 17:29:09 +0100 Subject: [PATCH] Split up C-comment in a multi-line macro that was confusing clang-format * Every time clang-format applied to this file, it would add a new \ on the end of the first line of the comment. Splitting it into two single-line C comments works around this behaviour. --- renderdoc/driver/vulkan/vk_common.cpp | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/renderdoc/driver/vulkan/vk_common.cpp b/renderdoc/driver/vulkan/vk_common.cpp index 50b687357..830902ca0 100644 --- a/renderdoc/driver/vulkan/vk_common.cpp +++ b/renderdoc/driver/vulkan/vk_common.cpp @@ -3009,26 +3009,26 @@ string ToStrHelper::Get(const VkPresentModeKHR &el) } // we know the object will be a non-dispatchable object type -#define SerialiseObjectInternal(type, name, obj, opt) \ - { \ - VulkanResourceManager *rm = (VulkanResourceManager *)GetUserData(); \ - ResourceId id; \ - if(m_Mode >= WRITING) \ - id = GetResID(obj); \ - Serialise(name, id); \ - if(m_Mode < WRITING) \ - { \ - obj = VK_NULL_HANDLE; \ - if(id != ResourceId()) \ - { \ - if(rm->HasLiveResource(id)) \ - obj = Unwrap(rm->GetLiveHandle(id)); \ - else if(!opt) \ - /* It can be OK for a resource to have no live equivalent if the \ - capture decided its not needed, which some APIs do fairly often. */ \ - RDCWARN("Capture may be missing reference to " #type " resource."); \ - } \ - } \ +#define SerialiseObjectInternal(type, name, obj, opt) \ + { \ + VulkanResourceManager *rm = (VulkanResourceManager *)GetUserData(); \ + ResourceId id; \ + if(m_Mode >= WRITING) \ + id = GetResID(obj); \ + Serialise(name, id); \ + if(m_Mode < WRITING) \ + { \ + obj = VK_NULL_HANDLE; \ + if(id != ResourceId()) \ + { \ + if(rm->HasLiveResource(id)) \ + obj = Unwrap(rm->GetLiveHandle(id)); \ + else if(!opt) \ + /* It can be OK for a resource to have no live equivalent if the */ \ + /* capture decided its not needed, which some APIs do fairly often. */ \ + RDCWARN("Capture may be missing reference to " #type " resource."); \ + } \ + } \ } #define SerialiseObject(type, name, obj) SerialiseObjectInternal(type, name, obj, false)