aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Basic
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic')
-rw-r--r--lib/Basic/Statistics.cpp8
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()];