Remove unused macros

This fixes compiler warnings from clang++ like these ones:

    src/ccutil/params.cpp:34:9: warning: macro is not used [-Wunused-macros]
    src/cutil/oldlist.cpp:67:9: warning: macro is not used [-Wunused-macros]
    src/cutil/oldlist.cpp:68:9: warning: macro is not used [-Wunused-macros]
    src/cutil/oldlist.cpp:78:9: warning: macro is not used [-Wunused-macros]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-05-26 16:42:16 +02:00
parent 39715629fb
commit ac999b2409
20 changed files with 7 additions and 79 deletions

View File

@ -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

View File

@ -42,7 +42,6 @@ class BLOCK;
class ROW;
#define PERFECT_WERDS 999
#define MAXSPACING 128 /*max expected spacing in pix */
namespace tesseract {

View File

@ -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 {

View File

@ -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
{

View File

@ -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.

View File

@ -22,8 +22,6 @@
#include "stepblob.h"
#include "tprintf.h"
#define BLOCK_LABEL_HEIGHT 150 //char height of block id
ELISTIZE (BLOCK)
/**
* BLOCK::BLOCK

View File

@ -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");

View File

@ -31,7 +31,6 @@
#define PLUS '+' //flag states
#define MINUS '-'
#define EQUAL '='
tesseract::ParamsVectors *GlobalParams() {
static tesseract::ParamsVectors global_params = tesseract::ParamsVectors();

View File

@ -27,8 +27,6 @@
#include "serialis.h"
#include "unichar.h"
#define REALLY_QUOTE_IT(x) QUOTE_IT(x)
#define MAX_CUTOFF 1000
namespace tesseract {

View File

@ -18,9 +18,7 @@
Include Files and Type Defines
----------------------------------------------------------------------------*/
#define _USE_MATH_DEFINES // for M_PI
#include "mfx.h"
#include <cmath> // 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
-----------------------------------------------------------------------------*/

View File

@ -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
----------------------------------------------------------------------*/

View File

@ -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

View File

@ -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");
@ -65,9 +65,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

View File

@ -25,8 +25,6 @@
#include "pithsync.h"
#include "tprintf.h"
#define PROJECTION_MARGIN 10 //arbitrary
/**********************************************************************
* FPCUTPT::setup
*

View File

@ -55,7 +55,6 @@ EXTERN double_VAR (textord_projection_scale, 0.200, "Ding rate for mid-cuts");
EXTERN 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.

View File

@ -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

View File

@ -41,7 +41,6 @@ EXTERN BOOL_VAR(textord_force_make_prop_words, false,
EXTERN BOOL_VAR(textord_chopper_test, false,
"Chopper is being tested.");
#define FIXED_WIDTH_MULTIPLE 5
#define BLOCK_STATS_CLUSTERS 10

View File

@ -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;

View File

@ -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

View File

@ -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