Fix CID 1164638 (Uninitialized scalar field)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-09-14 17:18:15 +02:00 committed by zdenop
parent 60f3b89a45
commit 7c7494723f
2 changed files with 5 additions and 11 deletions

View File

@ -48,12 +48,6 @@ STATS::STATS(int32_t min_bucket_value, int32_t max_bucket_value_plus_1) {
clear();
}
STATS::STATS() {
rangemax_ = 0;
rangemin_ = 0;
buckets_ = nullptr;
}
/**********************************************************************
* STATS::set_range
*

View File

@ -41,7 +41,7 @@ class STATS {
// TODO(rays) This is ugly. Convert the second argument to
// max_bucket_value and all the code that uses it.
STATS(int32_t min_bucket_value, int32_t max_bucket_value_plus_1);
STATS(); // empty for arrays
STATS() = default; // empty for arrays
~STATS();
@ -139,11 +139,11 @@ class STATS {
#endif // GRAPHICS_DISABLED
private:
int32_t rangemin_; // min of range
int32_t rangemin_ = 0; // min of range
// rangemax_ is not well named as it is really one past the max.
int32_t rangemax_; // max of range
int32_t total_count_; // no of samples
int32_t* buckets_; // array of cells
int32_t rangemax_ = 0; // max of range
int32_t total_count_ = 0; // no of samples
int32_t* buckets_ = nullptr; // array of cells
};
// Returns the nth ordered item from the array, as if they were