wordrec: Replace TRUE, FALSE by true, false

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-03-30 15:08:00 +01:00
parent cbb5e729a1
commit b391ab84d0
5 changed files with 23 additions and 24 deletions

View File

@ -121,7 +121,7 @@ EDGEPT *Wordrec::pick_close_point(EDGEPT *critical_point,
int found_better;
do {
found_better = FALSE;
found_better = false;
this_distance = edgept_dist (critical_point, vertical_point);
if (this_distance <= *best_dist) {
@ -133,12 +133,12 @@ EDGEPT *Wordrec::pick_close_point(EDGEPT *critical_point,
*best_dist = this_distance;
best_point = vertical_point;
if (chop_vertical_creep)
found_better = TRUE;
found_better = true;
}
}
vertical_point = vertical_point->next;
}
while (found_better == TRUE);
while (found_better == true);
return (best_point);
}

View File

@ -25,7 +25,6 @@
#include "blobs.h" // for TPOINT, TBLOB, EDGEPT, TESSLINE, divisible_blob
#include "callcpp.h" // for Red
#include "dict.h" // for Dict
#include "host.h" // for FALSE, TRUE
#include "lm_pain_points.h" // for LMPainPoints
#include "lm_state.h" // for BestChoiceBundle
#include "matrix.h" // for MATRIX
@ -90,8 +89,8 @@ static int any_shared_split_points(const GenericVector<SEAM*>& seams, SEAM *seam
length = seams.size();
for (index = 0; index < length; index++)
if (seam->SharesPosition(*seams[index])) return TRUE;
return FALSE;
if (seam->SharesPosition(*seams[index])) return true;
return false;
}
/**

View File

@ -39,7 +39,7 @@
/**********************************************************************
* same_point
*
* Return TRUE if the point values are the same. The parameters must
* Return true if the point values are the same. The parameters must
* be of type POINT.
**********************************************************************/
#define same_point(p1,p2) \
@ -86,7 +86,7 @@
/**********************************************************************
* is_exterior_point
*
* Return TRUE if the point supplied is an exterior projection from the
* Return true if the point supplied is an exterior projection from the
* outline.
**********************************************************************/
@ -99,7 +99,7 @@
/**********************************************************************
* is_equal
*
* Return TRUE if the POINTs are equal.
* Return true if the POINTs are equal.
**********************************************************************/
#define is_equal(p1,p2) \
@ -108,7 +108,7 @@
/**********************************************************************
* is_on_line
*
* Return TRUE if the point is on the line segment between the two end
* Return true if the point is on the line segment between the two end
* points. The two end points are included as part of the line. The
* parameters must be of type POINT.
**********************************************************************/
@ -120,8 +120,8 @@
/**********************************************************************
* within_range
*
* Return TRUE if the first number is in between the second two numbers.
* Return FALSE otherwise.
* Return true if the first number is in between the second two numbers.
* Return false otherwise.
**********************************************************************/
#define within_range(x,x0,x1) \

View File

@ -46,20 +46,20 @@ Wordrec::Wordrec() :
namespace tesseract {
Wordrec::Wordrec() :
// control parameters
BOOL_MEMBER(merge_fragments_in_matrix, TRUE,
BOOL_MEMBER(merge_fragments_in_matrix, true,
"Merge the fragments in the ratings matrix and delete them"
" after merging", params()),
BOOL_MEMBER(wordrec_no_block, FALSE, "Don't output block information",
BOOL_MEMBER(wordrec_no_block, false, "Don't output block information",
params()),
BOOL_MEMBER(wordrec_enable_assoc, TRUE, "Associator Enable",
BOOL_MEMBER(wordrec_enable_assoc, true, "Associator Enable",
params()),
BOOL_MEMBER(force_word_assoc, FALSE,
BOOL_MEMBER(force_word_assoc, false,
"force associator to run regardless of what enable_assoc is."
" This is used for CJK where component grouping is necessary.",
CCUtil::params()),
double_MEMBER(wordrec_worst_state, 1.0, "Worst segmentation state",
params()),
BOOL_MEMBER(fragments_guide_chopper, FALSE,
BOOL_MEMBER(fragments_guide_chopper, false,
"Use information from fragments to guide chopping process",
params()),
INT_MEMBER(repair_unchopped_blobs, 1, "Fix blobs that aren't chopped",
@ -106,7 +106,7 @@ Wordrec::Wordrec() :
params()),
INT_MEMBER(segment_adjust_debug, 0, "Segmentation adjustment debug",
params()),
BOOL_MEMBER(assume_fixed_pitch_char_segment, FALSE,
BOOL_MEMBER(assume_fixed_pitch_char_segment, false,
"include fixed-pitch heuristics in char segmentation",
params()),
INT_MEMBER(wordrec_debug_level, 0,

View File

@ -192,16 +192,16 @@ ELISTIZEH(FRAGMENT)
class Wordrec : public Classify {
public:
// config parameters *******************************************************
BOOL_VAR_H(merge_fragments_in_matrix, TRUE,
BOOL_VAR_H(merge_fragments_in_matrix, true,
"Merge the fragments in the ratings matrix and delete them "
"after merging");
BOOL_VAR_H(wordrec_no_block, FALSE, "Don't output block information");
BOOL_VAR_H(wordrec_enable_assoc, TRUE, "Associator Enable");
BOOL_VAR_H(force_word_assoc, FALSE,
BOOL_VAR_H(wordrec_no_block, false, "Don't output block information");
BOOL_VAR_H(wordrec_enable_assoc, true, "Associator Enable");
BOOL_VAR_H(force_word_assoc, false,
"force associator to run regardless of what enable_assoc is."
"This is used for CJK where component grouping is necessary.");
double_VAR_H(wordrec_worst_state, 1, "Worst segmentation state");
BOOL_VAR_H(fragments_guide_chopper, FALSE,
BOOL_VAR_H(fragments_guide_chopper, false,
"Use information from fragments to guide chopping process");
INT_VAR_H(repair_unchopped_blobs, 1, "Fix blobs that aren't chopped");
double_VAR_H(tessedit_certainty_threshold, -2.25, "Good blob limit");
@ -226,7 +226,7 @@ class Wordrec : public Classify {
double_VAR_H(chop_good_split, 50.0, "Good split limit");
INT_VAR_H(chop_x_y_weight, 3, "X / Y length weight");
INT_VAR_H(segment_adjust_debug, 0, "Segmentation adjustment debug");
BOOL_VAR_H(assume_fixed_pitch_char_segment, FALSE,
BOOL_VAR_H(assume_fixed_pitch_char_segment, false,
"include fixed-pitch heuristics in char segmentation");
INT_VAR_H(wordrec_debug_level, 0, "Debug level for wordrec");
INT_VAR_H(wordrec_max_join_chunks, 4,