Fix CID 1386099 (Uninitialized pointer field)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-09-14 15:41:30 +02:00
parent 46f21a4182
commit 97dda3d535
2 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@
namespace tesseract {
LSTMTester::LSTMTester(int64_t max_memory)
: test_data_(max_memory), total_pages_(0), async_running_(false) {}
: test_data_(max_memory) {}
// Loads a set of lstmf files that were created using the lstm.train config to
// tesseract into memory ready for testing. Returns false if nothing was

View File

@ -73,16 +73,16 @@ class LSTMTester {
// The data to test with.
DocumentCache test_data_;
int total_pages_;
int total_pages_ = 0;
// Flag that indicates an asynchronous test is currently running.
// Protected by running_mutex_.
bool async_running_;
bool async_running_ = false;
std::mutex running_mutex_;
// Stored copies of the args for use while running asynchronously.
int test_iteration_;
const double* test_training_errors_;
int test_iteration_ = 0;
const double* test_training_errors_ = nullptr;
TessdataManager test_model_mgr_;
int test_training_stage_;
int test_training_stage_ = 0;
STRING test_result_;
};