From 5dd606c631f8406985d6ea5473ae492c578d6346 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 1 Jan 2019 22:40:06 +0100 Subject: [PATCH] Replace NULL by nullptr Signed-off-by: Stefan Weil --- src/ccmain/control.cpp | 4 ++-- unittest/lstm_test.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ccmain/control.cpp b/src/ccmain/control.cpp index 9f2b8256bf..9ac86824bd 100644 --- a/src/ccmain/control.cpp +++ b/src/ccmain/control.cpp @@ -1300,7 +1300,7 @@ float Tesseract::ClassifyBlobAsWord(int pass_n, PAGE_RES_IT* pr_it, SetupWordPassN(1, &wd); classify_word_and_language(pass_n, &it, &wd); if (debug_noise_removal) { - if (wd.word->raw_choice != NULL) { + if (wd.word->raw_choice != nullptr) { tprintf("word xheight=%g, row=%g, range=[%g,%g]\n", word_res->x_height, wd.row->x_height(), wd.word->raw_choice->min_x_height(), wd.word->raw_choice->max_x_height()); @@ -1310,7 +1310,7 @@ float Tesseract::ClassifyBlobAsWord(int pass_n, PAGE_RES_IT* pr_it, } } float cert = 0.0f; - if (wd.word->raw_choice != NULL) { // This probably shouldn't happen, but... + if (wd.word->raw_choice != nullptr) { // This probably shouldn't happen, but... cert = wd.word->raw_choice->certainty(); float rat = wd.word->raw_choice->rating(); *c2 = rat > 0.0f ? cert * cert / rat : 0.0f; diff --git a/unittest/lstm_test.h b/unittest/lstm_test.h index 8218d44209..74787f6c36 100644 --- a/unittest/lstm_test.h +++ b/unittest/lstm_test.h @@ -94,7 +94,7 @@ class LSTMTrainerTest : public testing::Test { iteration = trainer_->training_iteration(); mean_error += trainer_->LastSingleError(ET_CHAR_ERROR); } - trainer_->MaintainCheckpoints(NULL, &log_str); + trainer_->MaintainCheckpoints(nullptr, &log_str); iteration = trainer_->training_iteration(); mean_error *= 100.0 / kBatchIterations; LOG(INFO) << log_str.string();