From 4f369f10e42fa0316b20c2170becb037960937cd Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 15 Nov 2016 12:45:41 -0800 Subject: [PATCH] adapted delete to delete[] in BitVector to match new[] Former-commit-id: efa07c50f8cc95da0157066d14bde2d7b19033dc [formerly 98f2d9fa033c5c8ac91d58e7512d058320a1f735] Former-commit-id: bac56d6768caeee035d657eeca9522b3e1eefcf7 --- src/storage/BitVector.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/storage/BitVector.cpp b/src/storage/BitVector.cpp index c806b29da..adc68e480 100644 --- a/src/storage/BitVector.cpp +++ b/src/storage/BitVector.cpp @@ -86,12 +86,11 @@ namespace storm { buckets = new uint64_t[bucketCount](); } } - + BitVector::~BitVector() { if (buckets != nullptr) { - delete buckets; + delete[] buckets; } - } template @@ -219,7 +218,7 @@ namespace storm { std::fill_n(newBuckets + this->bucketCount(), newBucketCount - this->bucketCount(), 0); } if (buckets != nullptr) { - delete buckets; + delete[] buckets; } buckets = newBuckets; bitCount = newLength; @@ -243,7 +242,7 @@ namespace storm { uint64_t* newBuckets = new uint64_t[newBucketCount]; std::copy_n(buckets, newBucketCount, newBuckets); if (buckets != nullptr) { - delete buckets; + delete[] buckets; } buckets = newBuckets; bitCount = newLength;