From 9860ef1cb3e76c84c84a02c17b45b449ece97768 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 28 Apr 2022 15:01:59 -0700 Subject: [PATCH] Fixed dictionary move constructor --- BeefySysLib/util/Dictionary.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/BeefySysLib/util/Dictionary.h b/BeefySysLib/util/Dictionary.h index 321a38e5..cd15de93 100644 --- a/BeefySysLib/util/Dictionary.h +++ b/BeefySysLib/util/Dictionary.h @@ -389,12 +389,19 @@ public: Dictionary(Dictionary&& val) { - mAllocSize = val.mAllocSize; - mCount = val.mCount; mBuckets = val.mBuckets; mEntries = val.mEntries; - mFreeCount = val.mFreeCount; + mAllocSize = val.mAllocSize; + mCount = val.mCount; mFreeList = val.mFreeList; + mFreeCount = val.mFreeCount; + + val.mBuckets = NULL; + val.mEntries = NULL; + val.mAllocSize = 0; + val.mCount = 0; + val.mFreeList = 0; + val.mFreeCount = 0; } ~Dictionary()