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. --- source/core/dictionary.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/core/dictionary.h') diff --git a/source/core/dictionary.h b/source/core/dictionary.h index a38699368..1b3525756 100644 --- a/source/core/dictionary.h +++ b/source/core/dictionary.h @@ -2,7 +2,7 @@ #define CORE_LIB_DICTIONARY_H #include "list.h" #include "common.h" -#include "int-set.h" +#include "slang-uint-set.h" #include "exception.h" #include "slang-math.h" #include "hash.h" @@ -81,7 +81,7 @@ namespace Slang private: int bucketSizeMinusOne; int _count; - IntSet marks; + UIntSet marks; KeyValuePair* hashMap; void Free() { @@ -180,7 +180,7 @@ namespace Slang Dictionary newDict; newDict.bucketSizeMinusOne = newSize - 1; newDict.hashMap = new KeyValuePair[newSize]; - newDict.marks.setMax(newSize * 2); + newDict.marks.resizeAndClear(newSize * 2); if (hashMap) { for (auto & kvPair : *this) -- cgit v1.2.3