Skip to content

Commit

Permalink
Replace NULL by nullptr
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jan 1, 2019
1 parent 87d0f71 commit 5dd606c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ccmain/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion unittest/lstm_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 5dd606c

Please sign in to comment.