Skip to content

Commit

Permalink
Remove deprecated in C++11 'register' keyword (removed since C++17).
Browse files Browse the repository at this point in the history
  • Loading branch information
zamazan4ik committed May 19, 2018
1 parent a50b966 commit e7e8e20
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/classify/adaptmatch.cpp
Expand Up @@ -144,7 +144,7 @@ static float ScoredUnichar(UNICHAR_ID id, const ADAPT_RESULTS& results) {
return results.match[index].rating;
}

void InitMatcherRatings(register FLOAT32 *Rating);
void InitMatcherRatings(FLOAT32 *Rating);

int MakeTempProtoPerm(void *item1, void *item2);

Expand Down
10 changes: 5 additions & 5 deletions src/classify/cluster.cpp
Expand Up @@ -250,11 +250,11 @@ CLUSTER *FindNearestNeighbor(KDTREE *Tree,
CLUSTER *MakeNewCluster(CLUSTERER *Clusterer, TEMPCLUSTER *TempCluster);

int32_t MergeClusters (int16_t N,
register PARAM_DESC ParamDesc[],
register int32_t n1,
register int32_t n2,
register FLOAT32 m[],
register FLOAT32 m1[], register FLOAT32 m2[]);
PARAM_DESC ParamDesc[],
int32_t n1,
int32_t n2,
FLOAT32 m[],
FLOAT32 m1[], register FLOAT32 m2[]);

void ComputePrototypes(CLUSTERER *Clusterer, CLUSTERCONFIG *Config);

Expand Down
2 changes: 1 addition & 1 deletion src/classify/intmatcher.cpp
Expand Up @@ -1232,7 +1232,7 @@ float IntegerMatcher::ApplyCNCorrection(float rating, int blob_length,
* @note History: Tue Feb 19 10:24:24 MST 1991, RWM, Created.
*/
void
HeapSort (int n, register int ra[], register int rb[]) {
HeapSort (int n, int ra[], int rb[]) {
int i, rra, rrb;
int l, j, ir;

Expand Down
2 changes: 1 addition & 1 deletion src/classify/intmatcher.h
Expand Up @@ -196,7 +196,7 @@ void IMDebugConfigurationSum(INT_FEATURE FeatureNum,
uint8_t *FeatureEvidence,
int32_t ConfigCount);

void HeapSort (int n, register int ra[], register int rb[]);
void HeapSort (int n, int ra[], int rb[]);

/**----------------------------------------------------------------------------
Global Data Definitions and Declarations
Expand Down
12 changes: 6 additions & 6 deletions src/classify/intproto.cpp
Expand Up @@ -131,9 +131,9 @@ FLOAT32 BucketEnd(int Bucket, FLOAT32 Offset, int NumBuckets);

void DoFill(FILL_SPEC *FillSpec,
CLASS_PRUNER_STRUCT* Pruner,
register uint32_t ClassMask,
register uint32_t ClassCount,
register uint32_t WordIndex);
uint32_t ClassMask,
uint32_t ClassCount,
uint32_t WordIndex);

BOOL8 FillerDone(TABLE_FILLER *Filler);

Expand Down Expand Up @@ -1180,9 +1180,9 @@ FLOAT32 BucketEnd(int Bucket, FLOAT32 Offset, int NumBuckets) {
*/
void DoFill(FILL_SPEC *FillSpec,
CLASS_PRUNER_STRUCT* Pruner,
register uint32_t ClassMask,
register uint32_t ClassCount,
register uint32_t WordIndex) {
uint32_t ClassMask,
uint32_t ClassCount,
uint32_t WordIndex) {
int X, Y, Angle;
uint32_t OldWord;

Expand Down
4 changes: 2 additions & 2 deletions src/classify/normmatch.cpp
Expand Up @@ -46,7 +46,7 @@ struct NORM_PROTOS
/*----------------------------------------------------------------------------
Private Function Prototypes
----------------------------------------------------------------------------*/
double NormEvidenceOf(register double NormAdj);
double NormEvidenceOf(double NormAdj);

void PrintNormMatch(FILE *File,
int NumParams,
Expand Down Expand Up @@ -181,7 +181,7 @@ void Classify::FreeNormProtos() {
* normalization adjustment. The equation that represents the transform is:
* 1 / (1 + (NormAdj / midpoint) ^ curl)
*/
double NormEvidenceOf(register double NormAdj) {
double NormEvidenceOf(double NormAdj) {
NormAdj /= classify_norm_adj_midpoint;

if (classify_norm_adj_curl == 3)
Expand Down
2 changes: 1 addition & 1 deletion src/textord/oldbasel.cpp
Expand Up @@ -955,7 +955,7 @@ float ydiffs[] /*output */

int
choose_partition ( //select partition
register float diff, /*diff from spline */
float diff, /*diff from spline */
float partdiffs[], /*diff on all parts */
int lastpart, /*last assigned partition */
float jumplimit, /*new part threshold */
Expand Down
2 changes: 1 addition & 1 deletion src/textord/oldbasel.h
Expand Up @@ -89,7 +89,7 @@ QSPLINE * spline, /*approximating spline */
float ydiffs[] /*output */
);
int choose_partition ( //select partition
register float diff, /*diff from spline */
float diff, /*diff from spline */
float partdiffs[], /*diff on all parts */
int lastpart, /*last assigned partition */
float jumplimit, /*new part threshold */
Expand Down
2 changes: 1 addition & 1 deletion src/training/mergenf.h
Expand Up @@ -83,7 +83,7 @@ FLOAT32 SubfeatureEvidence (
PROTO Proto);

double EvidenceOf (
register double Similarity);
double Similarity);

BOOL8 DummyFastMatch (
FEATURE Feature,
Expand Down
4 changes: 2 additions & 2 deletions src/wordrec/gradechop.cpp
Expand Up @@ -48,7 +48,7 @@ namespace tesseract {
* 0 = "perfect"
* 100 = "no way jay"
**********************************************************************/
PRIORITY Wordrec::grade_split_length(register SPLIT *split) {
PRIORITY Wordrec::grade_split_length(SPLIT *split) {
PRIORITY grade;
float split_length;

Expand All @@ -71,7 +71,7 @@ PRIORITY Wordrec::grade_split_length(register SPLIT *split) {
* 0 = "perfect"
* 100 = "no way jay"
**********************************************************************/
PRIORITY Wordrec::grade_sharpness(register SPLIT *split) {
PRIORITY Wordrec::grade_sharpness(SPLIT *split) {
PRIORITY grade;

grade = point_priority (split->point1) + point_priority (split->point2);
Expand Down
4 changes: 2 additions & 2 deletions src/wordrec/wordrec.h
Expand Up @@ -351,8 +351,8 @@ class Wordrec : public Classify {
SEAM ** seam, TBLOB * blob);

// gradechop.cpp
PRIORITY grade_split_length(register SPLIT *split);
PRIORITY grade_sharpness(register SPLIT *split);
PRIORITY grade_split_length(SPLIT *split);
PRIORITY grade_sharpness(SPLIT *split);

// outlines.cpp
bool near_point(EDGEPT *point, EDGEPT *line_pt_0, EDGEPT *line_pt_1,
Expand Down

0 comments on commit e7e8e20

Please sign in to comment.