diff --git a/src/ccmain/control.cpp b/src/ccmain/control.cpp index 27a1aa0dc..b786bca27 100644 --- a/src/ccmain/control.cpp +++ b/src/ccmain/control.cpp @@ -45,9 +45,6 @@ #include "tessvars.h" #include "werdit.h" -#define MIN_FONT_ROW_COUNT 8 -#define MAX_XHEIGHT_DIFF 3 - const char* const kBackUpConfigFile = "tempconfigdata.config"; // Min believable x-height for any text when refitting as a fraction of // original x-height diff --git a/src/ccmain/fixspace.cpp b/src/ccmain/fixspace.cpp index 62a6e9ab2..dab457e5d 100644 --- a/src/ccmain/fixspace.cpp +++ b/src/ccmain/fixspace.cpp @@ -42,7 +42,6 @@ class BLOCK; class ROW; #define PERFECT_WERDS 999 -#define MAXSPACING 128 /*max expected spacing in pix */ namespace tesseract { diff --git a/src/ccmain/output.cpp b/src/ccmain/output.cpp index 2fcc8c273..271f4afff 100644 --- a/src/ccmain/output.cpp +++ b/src/ccmain/output.cpp @@ -29,14 +29,7 @@ #include "reject.h" #endif -#define EPAPER_EXT ".ep" -#define PAGE_YSIZE 3508 -#define CTRL_INSET '\024' //dc4=text inset -#define CTRL_FONT '\016' //so=font change -#define CTRL_DEFAULT '\017' //si=default font -#define CTRL_SHIFT '\022' //dc2=x shift -#define CTRL_TAB '\011' //tab -#define CTRL_NEWLINE '\012' //newline +#define CTRL_NEWLINE '\012' //newline #define CTRL_HARDLINE '\015' //cr namespace tesseract { diff --git a/src/ccmain/pgedit.cpp b/src/ccmain/pgedit.cpp index e4f02c2b9..5f38b661b 100644 --- a/src/ccmain/pgedit.cpp +++ b/src/ccmain/pgedit.cpp @@ -42,7 +42,6 @@ #define X_HEIGHT (kBlnBaselineOffset + kBlnXHeight) #define BL_HEIGHT kBlnBaselineOffset #define DESC_HEIGHT 0 -#define MAXSPACING 128 /*max expected spacing in pix */ enum CMD_EVENTS { diff --git a/src/ccmain/tessedit.cpp b/src/ccmain/tessedit.cpp index 5bd7eb3a8..17f0951b4 100644 --- a/src/ccmain/tessedit.cpp +++ b/src/ccmain/tessedit.cpp @@ -41,9 +41,6 @@ # include "lstmrecognizer.h" #endif -// config under api -#define API_CONFIG "configs/api_config" - namespace tesseract { // Read a "config" file containing a set of variable, value pairs. diff --git a/src/ccstruct/ocrblock.cpp b/src/ccstruct/ocrblock.cpp index 1f1494c71..cbafd7e0d 100644 --- a/src/ccstruct/ocrblock.cpp +++ b/src/ccstruct/ocrblock.cpp @@ -22,8 +22,6 @@ #include "stepblob.h" #include "tprintf.h" -#define BLOCK_LABEL_HEIGHT 150 //char height of block id - ELISTIZE (BLOCK) /** * BLOCK::BLOCK diff --git a/src/ccstruct/polyaprx.cpp b/src/ccstruct/polyaprx.cpp index 8d7312966..1dabc9f90 100644 --- a/src/ccstruct/polyaprx.cpp +++ b/src/ccstruct/polyaprx.cpp @@ -28,7 +28,6 @@ #include "tprintf.h" // for tprintf #include "vecfuncs.h" // for LENGTH, point_diff, CROSS -#define EXTERN #define FASTEDGELENGTH 256 static BOOL_VAR(poly_debug, false, "Debug old poly"); diff --git a/src/ccutil/params.cpp b/src/ccutil/params.cpp index a022ed594..00bf25635 100644 --- a/src/ccutil/params.cpp +++ b/src/ccutil/params.cpp @@ -31,7 +31,6 @@ #define PLUS '+' //flag states #define MINUS '-' -#define EQUAL '=' tesseract::ParamsVectors *GlobalParams() { static tesseract::ParamsVectors global_params = tesseract::ParamsVectors(); diff --git a/src/classify/cutoffs.cpp b/src/classify/cutoffs.cpp index 59d8d7fb0..da7c99e61 100644 --- a/src/classify/cutoffs.cpp +++ b/src/classify/cutoffs.cpp @@ -27,8 +27,6 @@ #include "serialis.h" #include "unichar.h" -#define REALLY_QUOTE_IT(x) QUOTE_IT(x) - #define MAX_CUTOFF 1000 namespace tesseract { diff --git a/src/classify/mfx.cpp b/src/classify/mfx.cpp index ac46a0142..98b3130da 100644 --- a/src/classify/mfx.cpp +++ b/src/classify/mfx.cpp @@ -18,9 +18,7 @@ Include Files and Type Defines ----------------------------------------------------------------------------*/ -#define _USE_MATH_DEFINES // for M_PI #include "mfx.h" -#include // for M_PI #include "mfdefs.h" #include "mfoutline.h" #include "clusttool.h" //NEEDED @@ -38,12 +36,6 @@ double_VAR(classify_min_slope, 0.414213562, double_VAR(classify_max_slope, 2.414213562, "Slope above which lines are called vertical"); -/*---------------------------------------------------------------------------- - Macros -----------------------------------------------------------------------------*/ -/* miscellaneous macros */ -#define NormalizeAngle(A) ((((A) < 0) ? ((A) + 2 * M_PI) : (A)) / (2 * M_PI)) - /*---------------------------------------------------------------------------- Private Function Prototypes -----------------------------------------------------------------------------*/ diff --git a/src/cutil/oldlist.cpp b/src/cutil/oldlist.cpp index 473678f46..27c25e558 100644 --- a/src/cutil/oldlist.cpp +++ b/src/cutil/oldlist.cpp @@ -61,23 +61,6 @@ #include "errcode.h" // for ASSERT_HOST #include "structures.h" -/*---------------------------------------------------------------------- - M a c r o s -----------------------------------------------------------------------*/ -#define add_on(l, x) l = push(l, first_node(x)) -#define next_one(l) l = list_rest(l) - -/********************************************************************** - * c o p y f i r s t - * - * Do the appropriate kind a push operation to copy the first node from - * one list to another. - * - **********************************************************************/ - -#define copy_first(l1,l2) \ -(l2=push(l2, first_node(l1))) - /*---------------------------------------------------------------------- F u n c t i o n s ----------------------------------------------------------------------*/ diff --git a/src/textord/drawtord.cpp b/src/textord/drawtord.cpp index 8511b709f..a10aa2201 100644 --- a/src/textord/drawtord.cpp +++ b/src/textord/drawtord.cpp @@ -29,12 +29,10 @@ #define TO_WIN_NAME "Textord" //title of window -#define EXTERN - -EXTERN BOOL_VAR (textord_show_fixed_cuts, false, +BOOL_VAR (textord_show_fixed_cuts, false, "Draw fixed pitch cell boundaries"); -EXTERN ScrollView* to_win = nullptr; +ScrollView* to_win = nullptr; /********************************************************************** * create_to_win diff --git a/src/textord/edgblob.cpp b/src/textord/edgblob.cpp index 6663a6243..477d2d54e 100644 --- a/src/textord/edgblob.cpp +++ b/src/textord/edgblob.cpp @@ -26,8 +26,6 @@ #include "config_auto.h" #endif -#define EXTERN - // Control parameters used in outline_complexity(), which rejects an outline // if any one of the 3 conditions is satisfied: // - number of children exceeds edges_max_children_per_outline diff --git a/src/textord/fpchop.cpp b/src/textord/fpchop.cpp index 4ca70dcb8..3d3b8e49d 100644 --- a/src/textord/fpchop.cpp +++ b/src/textord/fpchop.cpp @@ -28,11 +28,9 @@ #include "config_auto.h" #endif -#define EXTERN - -EXTERN INT_VAR (textord_fp_chop_error, 2, +INT_VAR (textord_fp_chop_error, 2, "Max allowed bending of chop cells"); -EXTERN double_VAR (textord_fp_chop_snap, 0.5, +double_VAR (textord_fp_chop_snap, 0.5, "Max distance of chop pt from vertex"); ELISTIZE(C_OUTLINE_FRAG) diff --git a/src/textord/oldbasel.cpp b/src/textord/oldbasel.cpp index 16107ae99..833a0ab9b 100644 --- a/src/textord/oldbasel.cpp +++ b/src/textord/oldbasel.cpp @@ -1,7 +1,7 @@ /********************************************************************** * File: oldbasel.cpp (Formerly oldbl.c) * Description: A re-implementation of the old baseline algorithm. - * Author: Ray Smith + * Author: Ray Smith * * (C) Copyright 1993, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,11 +34,9 @@ #include -#define EXTERN - static BOOL_VAR (textord_really_old_xheight, false, "Use original wiseowl xheight"); -EXTERN BOOL_VAR (textord_oldbl_debug, false, "Debug old baseline generation"); +BOOL_VAR (textord_oldbl_debug, false, "Debug old baseline generation"); static BOOL_VAR (textord_debug_baselines, false, "Debug baseline generation"); static BOOL_VAR (textord_oldbl_paradef, true, "Use para default mechanism"); static BOOL_VAR (textord_oldbl_split_splines, true, "Split stepped splines"); @@ -65,9 +63,6 @@ static double_VAR (textord_oldbl_jumplimit, 0.15, #define MAXOVERLAP 0.1 /*max 10% missed overlap */ #define MAXBADRUN 2 /*max non best for failed */ #define HEIGHTBUCKETS 200 /* Num of buckets */ -#define DELTAHEIGHT 5.0 /* Small amount of diff */ -#define GOODHEIGHT 5 -#define MAXLOOPS 10 #define MODENUM 10 #define MAXPARTS 6 #define SPLINESIZE 23 diff --git a/src/textord/pithsync.cpp b/src/textord/pithsync.cpp index add9c2512..800d050dd 100644 --- a/src/textord/pithsync.cpp +++ b/src/textord/pithsync.cpp @@ -25,8 +25,6 @@ #include "pithsync.h" #include "tprintf.h" -#define PROJECTION_MARGIN 10 //arbitrary - /********************************************************************** * FPCUTPT::setup * diff --git a/src/textord/scanedg.cpp b/src/textord/scanedg.cpp index 2e7e4ab82..3d638da9a 100644 --- a/src/textord/scanedg.cpp +++ b/src/textord/scanedg.cpp @@ -57,7 +57,7 @@ void block_edges(Pix *t_pix, // thresholded image std::unique_ptr bwline(new uint8_t[width]); - uint8_t margin = WHITE_PIX; + const uint8_t margin = WHITE_PIX; for (int y = tright.y() - 1; y >= bleft.y() - 1; y--) { if (y >= bleft.y() && y < tright.y()) { @@ -149,7 +149,6 @@ void line_edges(int16_t x, // coord of line start C_OUTLINE_IT* outline_it) { CrackPos pos = {free_cracks, x, y }; int xmax; // max x coord - int colour; // of current pixel int prevcolour; // of previous pixel CRACKEDGE *current; // current h edge CRACKEDGE *newcurrent; // new h edge @@ -160,7 +159,7 @@ void line_edges(int16_t x, // coord of line start // do each pixel for (; pos.x < xmax; pos.x++, prevline++) { - colour = *bwpos++; // current pixel + const int colour = *bwpos++; // current pixel if (*prevline != nullptr) { // changed above // change colour diff --git a/src/textord/topitch.cpp b/src/textord/topitch.cpp index a1c681c41..dd0289c25 100644 --- a/src/textord/topitch.cpp +++ b/src/textord/topitch.cpp @@ -34,28 +34,25 @@ #include -#define EXTERN - static BOOL_VAR (textord_all_prop, false, "All doc is proportial text"); -EXTERN BOOL_VAR (textord_debug_pitch_test, false, +BOOL_VAR (textord_debug_pitch_test, false, "Debug on fixed pitch test"); static BOOL_VAR (textord_disable_pitch_test, false, "Turn off dp fixed pitch algorithm"); -EXTERN BOOL_VAR (textord_fast_pitch_test, false, +BOOL_VAR (textord_fast_pitch_test, false, "Do even faster pitch algorithm"); -EXTERN BOOL_VAR (textord_debug_pitch_metric, false, +BOOL_VAR (textord_debug_pitch_metric, false, "Write full metric stuff"); -EXTERN BOOL_VAR (textord_show_row_cuts, false, "Draw row-level cuts"); -EXTERN BOOL_VAR (textord_show_page_cuts, false, "Draw page-level cuts"); -EXTERN BOOL_VAR (textord_pitch_cheat, false, +BOOL_VAR (textord_show_row_cuts, false, "Draw row-level cuts"); +BOOL_VAR (textord_show_page_cuts, false, "Draw page-level cuts"); +BOOL_VAR (textord_pitch_cheat, false, "Use correct answer for fixed/prop"); -EXTERN BOOL_VAR (textord_blockndoc_fixed, false, +BOOL_VAR (textord_blockndoc_fixed, false, "Attempt whole doc/block fixed pitch"); -EXTERN double_VAR (textord_projection_scale, 0.200, "Ding rate for mid-cuts"); -EXTERN double_VAR (textord_balance_factor, 1.0, +double_VAR (textord_projection_scale, 0.200, "Ding rate for mid-cuts"); +double_VAR (textord_balance_factor, 1.0, "Ding rate for unbalanced char cells"); -#define FIXED_WIDTH_MULTIPLE 5 #define BLOCK_STATS_CLUSTERS 10 #define MAX_ALLOWED_PITCH 100 //max pixel pitch. diff --git a/src/textord/tovars.cpp b/src/textord/tovars.cpp index 8652e8b61..142cc02f5 100644 --- a/src/textord/tovars.cpp +++ b/src/textord/tovars.cpp @@ -20,64 +20,62 @@ #include "tovars.h" #include "params.h" -#define EXTERN - -EXTERN BOOL_VAR (textord_show_initial_words, false, "Display separate words"); -EXTERN BOOL_VAR (textord_show_new_words, false, "Display separate words"); -EXTERN BOOL_VAR (textord_show_fixed_words, false, +BOOL_VAR (textord_show_initial_words, false, "Display separate words"); +BOOL_VAR (textord_show_new_words, false, "Display separate words"); +BOOL_VAR (textord_show_fixed_words, false, "Display forced fixed pitch words"); -EXTERN BOOL_VAR (textord_blocksall_fixed, false, "Moan about prop blocks"); -EXTERN BOOL_VAR (textord_blocksall_prop, false, +BOOL_VAR (textord_blocksall_fixed, false, "Moan about prop blocks"); +BOOL_VAR (textord_blocksall_prop, false, "Moan about fixed pitch blocks"); -EXTERN BOOL_VAR (textord_blocksall_testing, false, "Dump stats when moaning"); -EXTERN BOOL_VAR (textord_test_mode, false, "Do current test"); -EXTERN INT_VAR (textord_dotmatrix_gap, 3, +BOOL_VAR (textord_blocksall_testing, false, "Dump stats when moaning"); +BOOL_VAR (textord_test_mode, false, "Do current test"); +INT_VAR (textord_dotmatrix_gap, 3, "Max pixel gap for broken pixed pitch"); -EXTERN INT_VAR (textord_debug_block, 0, "Block to do debug on"); -EXTERN INT_VAR (textord_pitch_range, 2, "Max range test on pitch"); -EXTERN double_VAR (textord_wordstats_smooth_factor, 0.05, +INT_VAR (textord_debug_block, 0, "Block to do debug on"); +INT_VAR (textord_pitch_range, 2, "Max range test on pitch"); +double_VAR (textord_wordstats_smooth_factor, 0.05, "Smoothing gap stats"); -EXTERN double_VAR (textord_width_smooth_factor, 0.10, +double_VAR (textord_width_smooth_factor, 0.10, "Smoothing width stats"); -EXTERN double_VAR (textord_words_width_ile, 0.4, +double_VAR (textord_words_width_ile, 0.4, "Ile of blob widths for space est"); -EXTERN double_VAR (textord_words_maxspace, 4.0, "Multiple of xheight"); -EXTERN double_VAR (textord_words_default_maxspace, 3.5, +double_VAR (textord_words_maxspace, 4.0, "Multiple of xheight"); +double_VAR (textord_words_default_maxspace, 3.5, "Max believable third space"); -EXTERN double_VAR (textord_words_default_minspace, 0.6, +double_VAR (textord_words_default_minspace, 0.6, "Fraction of xheight"); -EXTERN double_VAR (textord_words_min_minspace, 0.3, "Fraction of xheight"); -EXTERN double_VAR (textord_words_default_nonspace, 0.2, +double_VAR (textord_words_min_minspace, 0.3, "Fraction of xheight"); +double_VAR (textord_words_default_nonspace, 0.2, "Fraction of xheight"); -EXTERN double_VAR(textord_words_initial_lower, 0.25, +double_VAR(textord_words_initial_lower, 0.25, "Max initial cluster size"); -EXTERN double_VAR (textord_words_initial_upper, 0.15, +double_VAR (textord_words_initial_upper, 0.15, "Min initial cluster spacing"); -EXTERN double_VAR (textord_words_minlarge, 0.75, +double_VAR (textord_words_minlarge, 0.75, "Fraction of valid gaps needed"); -EXTERN double_VAR (textord_words_pitchsd_threshold, 0.040, +double_VAR (textord_words_pitchsd_threshold, 0.040, "Pitch sync threshold"); -EXTERN double_VAR (textord_words_def_fixed, 0.016, +double_VAR (textord_words_def_fixed, 0.016, "Threshold for definite fixed"); -EXTERN double_VAR (textord_words_def_prop, 0.090, +double_VAR (textord_words_def_prop, 0.090, "Threshold for definite prop"); -EXTERN INT_VAR (textord_words_veto_power, 5, +INT_VAR (textord_words_veto_power, 5, "Rows required to outvote a veto"); -EXTERN double_VAR (textord_pitch_rowsimilarity, 0.08, +double_VAR (textord_pitch_rowsimilarity, 0.08, "Fraction of xheight for sameness"); -EXTERN BOOL_VAR (textord_pitch_scalebigwords, false, +BOOL_VAR (textord_pitch_scalebigwords, false, "Scale scores on big words"); -EXTERN double_VAR(words_initial_lower, 0.5, "Max initial cluster size"); -EXTERN double_VAR (words_initial_upper, 0.15, "Min initial cluster spacing"); -EXTERN double_VAR (words_default_prop_nonspace, 0.25, "Fraction of xheight"); -EXTERN double_VAR (words_default_fixed_space, 0.75, "Fraction of xheight"); -EXTERN double_VAR (words_default_fixed_limit, 0.6, "Allowed size variance"); -EXTERN double_VAR (textord_words_definite_spread, 0.30, +double_VAR(words_initial_lower, 0.5, "Max initial cluster size"); +double_VAR (words_initial_upper, 0.15, "Min initial cluster spacing"); +double_VAR (words_default_prop_nonspace, 0.25, "Fraction of xheight"); +double_VAR (words_default_fixed_space, 0.75, "Fraction of xheight"); +double_VAR (words_default_fixed_limit, 0.6, "Allowed size variance"); +double_VAR (textord_words_definite_spread, 0.30, "Non-fuzzy spacing region"); -EXTERN double_VAR (textord_spacesize_ratiofp, 2.8, +double_VAR (textord_spacesize_ratiofp, 2.8, "Min ratio space/nonspace"); -EXTERN double_VAR (textord_spacesize_ratioprop, 2.0, +double_VAR (textord_spacesize_ratioprop, 2.0, "Min ratio space/nonspace"); -EXTERN double_VAR (textord_fpiqr_ratio, 1.5, "Pitch IQR/Gap IQR threshold"); -EXTERN double_VAR (textord_max_pitch_iqr, 0.20, "Xh fraction noise in pitch"); -EXTERN double_VAR (textord_fp_min_width, 0.5, "Min width of decent blobs"); +double_VAR (textord_fpiqr_ratio, 1.5, "Pitch IQR/Gap IQR threshold"); +double_VAR (textord_max_pitch_iqr, 0.20, "Xh fraction noise in pitch"); +double_VAR (textord_fp_min_width, 0.5, "Min width of decent blobs"); diff --git a/src/textord/underlin.cpp b/src/textord/underlin.cpp index dbeee8fe4..01a3f7e6b 100644 --- a/src/textord/underlin.cpp +++ b/src/textord/underlin.cpp @@ -18,12 +18,8 @@ #include "underlin.h" -#define PROJECTION_MARGIN 10 //arbitrary -#define EXTERN - -EXTERN double_VAR (textord_underline_offset, 0.1, "Fraction of x to ignore"); -EXTERN BOOL_VAR (textord_restore_underlines, true, -"Chop underlines & put back"); +double_VAR (textord_underline_offset, 0.1, "Fraction of x to ignore"); +BOOL_VAR (textord_restore_underlines, true, "Chop underlines & put back"); /********************************************************************** * restore_underlined_blobs diff --git a/src/textord/wordseg.cpp b/src/textord/wordseg.cpp index 2b9c53e5b..1f0b20097 100644 --- a/src/textord/wordseg.cpp +++ b/src/textord/wordseg.cpp @@ -33,15 +33,12 @@ #include "config_auto.h" #endif -#define EXTERN - -EXTERN BOOL_VAR(textord_fp_chopping, true, "Do fixed pitch chopping"); -EXTERN BOOL_VAR(textord_force_make_prop_words, false, +BOOL_VAR(textord_fp_chopping, true, "Do fixed pitch chopping"); +BOOL_VAR(textord_force_make_prop_words, false, "Force proportional word segmentation on all rows"); -EXTERN BOOL_VAR(textord_chopper_test, false, +BOOL_VAR(textord_chopper_test, false, "Chopper is being tested."); -#define FIXED_WIDTH_MULTIPLE 5 #define BLOCK_STATS_CLUSTERS 10 diff --git a/src/training/mftraining.cpp b/src/training/mftraining.cpp index 30926d079..47ddf1898 100644 --- a/src/training/mftraining.cpp +++ b/src/training/mftraining.cpp @@ -55,8 +55,6 @@ using tesseract::MasterTrainer; using tesseract::Shape; using tesseract::ShapeTable; -#define PROGRAM_FEATURE_TYPE "mf" - // Max length of a fake shape label. const int kMaxShapeLabelLength = 10; diff --git a/src/wordrec/drawfx.cpp b/src/wordrec/drawfx.cpp index 0577c87c1..8a6dc0fa5 100644 --- a/src/wordrec/drawfx.cpp +++ b/src/wordrec/drawfx.cpp @@ -32,23 +32,13 @@ #define FXDEMOYSIZE 256 #define BLN_MAX 512 //max coord for bln #define WERDWIDTH (BLN_MAX*20) -#define DECENT_WERD_WIDTH (5*kBlnXHeight) //title of window #define DEBUG_WIN_NAME "FXDebug" -#define DEBUG_XPOS 0 -#define DEBUG_YPOS 120 -#define DEBUG_XSIZE 80 -#define DEBUG_YSIZE 32 -#define YMAX 3508 -#define XMAX 2550 -#define MAXEDGELENGTH 1024 //max steps inoutline -#define EXTERN +STRING_VAR(fx_debugfile, DEBUG_WIN_NAME, "Name of debugfile"); -EXTERN STRING_VAR (fx_debugfile, DEBUG_WIN_NAME, "Name of debugfile"); - -EXTERN ScrollView* fx_win = nullptr; -EXTERN FILE *fx_debug = nullptr; +ScrollView* fx_win = nullptr; +FILE* fx_debug = nullptr; /********************************************************************** * create_fx_win diff --git a/src/wordrec/findseam.cpp b/src/wordrec/findseam.cpp index 996688cda..b6e3330bf 100644 --- a/src/wordrec/findseam.cpp +++ b/src/wordrec/findseam.cpp @@ -48,7 +48,6 @@ /* How many to keep */ #define MAX_NUM_SEAMS 150 /* How many to keep */ -#define MAX_OLD_SEAMS 150 #define NO_FULL_PRIORITY -1/* Special marker for pri. */ /* Evaluate right away */ #define BAD_PRIORITY 9999.0 diff --git a/unittest/applybox_test.cc b/unittest/applybox_test.cc index 34ef0a731..5ce1b37bd 100644 --- a/unittest/applybox_test.cc +++ b/unittest/applybox_test.cc @@ -32,9 +32,6 @@ class ApplyBoxTest : public testing::Test { return file::JoinPath(TESTING_DIR, name); } std::string TessdataPath() { return TESSDATA_DIR; } - std::string OutputNameToPath(const std::string& name) { - return file::JoinPath(FLAGS_test_tmpdir, name); - } ApplyBoxTest() { src_pix_ = nullptr; } ~ApplyBoxTest() { pixDestroy(&src_pix_); } diff --git a/unittest/mastertrainer_test.cc b/unittest/mastertrainer_test.cc index 0c3292b9c..90d22c7d4 100644 --- a/unittest/mastertrainer_test.cc +++ b/unittest/mastertrainer_test.cc @@ -171,9 +171,6 @@ class MasterTrainerTest : public testing::Test { std::string TestDataNameToPath(const std::string& name) { return file::JoinPath(TESTING_DIR, name); } - std::string TessdataPath() { - return TESSDATA_DIR; - } std::string TmpNameToPath(const std::string& name) { return file::JoinPath(FLAGS_test_tmpdir, name); }