summaryrefslogtreecommitdiffstats
path: root/source/core/dictionary.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-05-09 14:08:30 -0400
committerTim Foley <tfoleyNV@users.noreply.github.com>2019-05-09 11:08:29 -0700
commit30eee05f3f809e3950c8d8463ecdd9807c943692 (patch)
tree29f7e87847cea14468e8cda79abece91494fdaa2 /source/core/dictionary.h
parent88a3f6476c37f3245de6d607d8055879f8892ee4 (diff)
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.
Diffstat (limited to 'source/core/dictionary.h')
-rw-r--r--source/core/dictionary.h6
1 files changed, 3 insertions, 3 deletions
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<TKey, TValue>* hashMap;
void Free()
{
@@ -180,7 +180,7 @@ namespace Slang
Dictionary<TKey, TValue> newDict;
newDict.bucketSizeMinusOne = newSize - 1;
newDict.hashMap = new KeyValuePair<TKey, TValue>[newSize];
- newDict.marks.setMax(newSize * 2);
+ newDict.marks.resizeAndClear(newSize * 2);
if (hashMap)
{
for (auto & kvPair : *this)