diff options
author | Andrea Mattavelli <andreamattavelli@users.noreply.github.com> | 2017-09-14 13:58:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-14 13:58:11 +0100 |
commit | 2108b0e8566bb1d6e8629b7b6806c07010a8269f (patch) | |
tree | b6dce38dd98d681e97d08d0b42adff078ccf7215 /lib/Basic | |
parent | d19500eb93083c8cc6bb72bcb54414015830cacb (diff) | |
parent | b5929722363993bf0ad2a56d66176606cc742bc4 (diff) | |
download | klee-2108b0e8566bb1d6e8629b7b6806c07010a8269f.tar.gz |
Merge pull request #749 from odeits/issue/717
Remove unnecessary null pointer checks
Diffstat (limited to 'lib/Basic')
-rw-r--r-- | lib/Basic/Statistics.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Basic/Statistics.cpp b/lib/Basic/Statistics.cpp index 9c95a891..402b0e5a 100644 --- a/lib/Basic/Statistics.cpp +++ b/lib/Basic/Statistics.cpp @@ -22,18 +22,18 @@ StatisticManager::StatisticManager() } StatisticManager::~StatisticManager() { - if (globalStats) delete[] globalStats; - if (indexedStats) delete[] indexedStats; + delete[] globalStats; + delete[] indexedStats; } void StatisticManager::useIndexedStats(unsigned totalIndices) { - if (indexedStats) delete[] indexedStats; + delete[] indexedStats; indexedStats = new uint64_t[totalIndices * stats.size()]; memset(indexedStats, 0, sizeof(*indexedStats) * totalIndices * stats.size()); } void StatisticManager::registerStatistic(Statistic &s) { - if (globalStats) delete[] globalStats; + delete[] globalStats; s.id = stats.size(); stats.push_back(&s); globalStats = new uint64_t[stats.size()]; |