Skip to content

Commit

Permalink
Fix build for unittests
Browse files Browse the repository at this point in the history
Commit 29f2cff was the wrong fix
for the compiler warnings because it broke the unittest build.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed May 26, 2019
1 parent 4db6b9e commit 9a4bd04
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 3 additions & 0 deletions src/training/commandlineflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@
#endif

// Flags from commontraining.cpp
// Command line arguments for font_properties, xheights and unicharset.
DECLARE_INT_PARAM_FLAG(debug_level);
DECLARE_STRING_PARAM_FLAG(D);
DECLARE_STRING_PARAM_FLAG(F);
DECLARE_STRING_PARAM_FLAG(O);
DECLARE_STRING_PARAM_FLAG(U);
DECLARE_STRING_PARAM_FLAG(X);
DECLARE_STRING_PARAM_FLAG(fonts_dir);
DECLARE_STRING_PARAM_FLAG(fontconfig_tmpdir);
DECLARE_STRING_PARAM_FLAG(output_trainer);
DECLARE_STRING_PARAM_FLAG(test_ch);

namespace tesseract {
Expand Down
4 changes: 2 additions & 2 deletions src/training/commontraining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ INT_PARAM_FLAG(debug_level, 0, "Level of Trainer debugging");
static INT_PARAM_FLAG(load_images, 0, "Load images with tr files");
static STRING_PARAM_FLAG(configfile, "", "File to load more configs from");
STRING_PARAM_FLAG(D, "", "Directory to write output files to");
static STRING_PARAM_FLAG(F, "font_properties", "File listing font properties");
STRING_PARAM_FLAG(F, "font_properties", "File listing font properties");
STRING_PARAM_FLAG(X, "", "File listing font xheights");
STRING_PARAM_FLAG(U, "unicharset", "File to load unicharset from");
STRING_PARAM_FLAG(O, "", "File to write unicharset to");
static STRING_PARAM_FLAG(output_trainer, "", "File to write trainer to");
STRING_PARAM_FLAG(output_trainer, "", "File to write trainer to");
STRING_PARAM_FLAG(test_ch, "", "UTF8 test character string");
static DOUBLE_PARAM_FLAG(clusterconfig_min_samples_fraction, Config.MinSamples,
"Min number of samples per proto as % of total");
Expand Down
7 changes: 0 additions & 7 deletions unittest/mastertrainer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@
#include "commontraining.h"
#include "tessopt.h" // tessoptind

// Commontraining command-line arguments for font_properties, xheights and
// unicharset.
DECLARE_STRING_PARAM_FLAG(F);
DECLARE_STRING_PARAM_FLAG(X);
DECLARE_STRING_PARAM_FLAG(U);
DECLARE_STRING_PARAM_FLAG(output_trainer);

// Specs of the MockClassifier.
static const int kNumTopNErrs = 10;
static const int kNumTop2Errs = kNumTopNErrs + 20;
Expand Down

0 comments on commit 9a4bd04

Please sign in to comment.