mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 15:03:45 +08:00
Fix CID 1164638 (Uninitialized scalar field)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
60f3b89a45
commit
7c7494723f
@ -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
|
||||
*
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user