From 30eee05f3f809e3950c8d8463ecdd9807c943692 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 9 May 2019 14:08:30 -0400 Subject: IntSet -> UIntSet (#961) * * Fix warning in vk-swap-chain around use of Index. Rename _indexOf to _indexOfFormat. * Rename IntSet to UIntSet and put in own files slang-uint-set.h.cpp. Use UInt as the held type. * On UintSet setMax -> resizeAndClear. Doing so revealed bug in add. * Closer following of conventions - use kPrefix for constants (even though held in 'enum') * Small fixes/improvements * * Add some documentation to UIntSet methods * Use memset to set/reset bits * Fix some tabbing. Rename oldBufferSize -> oldCount * Fix tabs. --- tools/gfx/vk-swap-chain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/gfx/vk-swap-chain.cpp b/tools/gfx/vk-swap-chain.cpp index 340e6a6a4..bde68c413 100644 --- a/tools/gfx/vk-swap-chain.cpp +++ b/tools/gfx/vk-swap-chain.cpp @@ -11,7 +11,7 @@ namespace gfx { using namespace Slang; -static int _indexOf(List& formatsIn, VkFormat format) +static Index _indexOfFormat(List& formatsIn, VkFormat format) { const Index numFormats = formatsIn.getCount(); const VkSurfaceFormatKHR* formats = formatsIn.getBuffer(); @@ -81,7 +81,7 @@ SlangResult VulkanSwapChain::init(VulkanDeviceQueue* deviceQueue, const Desc& de for(Index i = 0; i < formats.getCount(); ++i) { VkFormat format = formats[i]; - if (_indexOf(surfaceFormats, format) >= 0) + if (_indexOfFormat(surfaceFormats, format) >= 0) { m_format = format; } -- cgit v1.2.3