Skip to content

Commit 9a4bd04

Browse files
committed
Fix build for unittests
Commit 29f2cff was the wrong fix for the compiler warnings because it broke the unittest build. Signed-off-by: Stefan Weil <[email protected]>
1 parent 4db6b9e commit 9a4bd04

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/training/commandlineflags.h

+3
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,16 @@
6363
#endif
6464

6565
// Flags from commontraining.cpp
66+
// Command line arguments for font_properties, xheights and unicharset.
6667
DECLARE_INT_PARAM_FLAG(debug_level);
6768
DECLARE_STRING_PARAM_FLAG(D);
69+
DECLARE_STRING_PARAM_FLAG(F);
6870
DECLARE_STRING_PARAM_FLAG(O);
6971
DECLARE_STRING_PARAM_FLAG(U);
7072
DECLARE_STRING_PARAM_FLAG(X);
7173
DECLARE_STRING_PARAM_FLAG(fonts_dir);
7274
DECLARE_STRING_PARAM_FLAG(fontconfig_tmpdir);
75+
DECLARE_STRING_PARAM_FLAG(output_trainer);
7376
DECLARE_STRING_PARAM_FLAG(test_ch);
7477

7578
namespace tesseract {

src/training/commontraining.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ INT_PARAM_FLAG(debug_level, 0, "Level of Trainer debugging");
9393
static INT_PARAM_FLAG(load_images, 0, "Load images with tr files");
9494
static STRING_PARAM_FLAG(configfile, "", "File to load more configs from");
9595
STRING_PARAM_FLAG(D, "", "Directory to write output files to");
96-
static STRING_PARAM_FLAG(F, "font_properties", "File listing font properties");
96+
STRING_PARAM_FLAG(F, "font_properties", "File listing font properties");
9797
STRING_PARAM_FLAG(X, "", "File listing font xheights");
9898
STRING_PARAM_FLAG(U, "unicharset", "File to load unicharset from");
9999
STRING_PARAM_FLAG(O, "", "File to write unicharset to");
100-
static STRING_PARAM_FLAG(output_trainer, "", "File to write trainer to");
100+
STRING_PARAM_FLAG(output_trainer, "", "File to write trainer to");
101101
STRING_PARAM_FLAG(test_ch, "", "UTF8 test character string");
102102
static DOUBLE_PARAM_FLAG(clusterconfig_min_samples_fraction, Config.MinSamples,
103103
"Min number of samples per proto as % of total");

unittest/mastertrainer_test.cc

-7
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@
4141
#include "commontraining.h"
4242
#include "tessopt.h" // tessoptind
4343

44-
// Commontraining command-line arguments for font_properties, xheights and
45-
// unicharset.
46-
DECLARE_STRING_PARAM_FLAG(F);
47-
DECLARE_STRING_PARAM_FLAG(X);
48-
DECLARE_STRING_PARAM_FLAG(U);
49-
DECLARE_STRING_PARAM_FLAG(output_trainer);
50-
5144
// Specs of the MockClassifier.
5245
static const int kNumTopNErrs = 10;
5346
static const int kNumTop2Errs = kNumTopNErrs + 20;

0 commit comments

Comments
 (0)