Skip to content

Commit e7e8e20

Browse files
committed
Remove deprecated in C++11 'register' keyword (removed since C++17).
1 parent a50b966 commit e7e8e20

File tree

11 files changed

+23
-23
lines changed

11 files changed

+23
-23
lines changed

src/classify/adaptmatch.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static float ScoredUnichar(UNICHAR_ID id, const ADAPT_RESULTS& results) {
144144
return results.match[index].rating;
145145
}
146146

147-
void InitMatcherRatings(register FLOAT32 *Rating);
147+
void InitMatcherRatings(FLOAT32 *Rating);
148148

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

src/classify/cluster.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@ CLUSTER *FindNearestNeighbor(KDTREE *Tree,
250250
CLUSTER *MakeNewCluster(CLUSTERER *Clusterer, TEMPCLUSTER *TempCluster);
251251

252252
int32_t MergeClusters (int16_t N,
253-
register PARAM_DESC ParamDesc[],
254-
register int32_t n1,
255-
register int32_t n2,
256-
register FLOAT32 m[],
257-
register FLOAT32 m1[], register FLOAT32 m2[]);
253+
PARAM_DESC ParamDesc[],
254+
int32_t n1,
255+
int32_t n2,
256+
FLOAT32 m[],
257+
FLOAT32 m1[], register FLOAT32 m2[]);
258258

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

src/classify/intmatcher.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ float IntegerMatcher::ApplyCNCorrection(float rating, int blob_length,
12321232
* @note History: Tue Feb 19 10:24:24 MST 1991, RWM, Created.
12331233
*/
12341234
void
1235-
HeapSort (int n, register int ra[], register int rb[]) {
1235+
HeapSort (int n, int ra[], int rb[]) {
12361236
int i, rra, rrb;
12371237
int l, j, ir;
12381238

src/classify/intmatcher.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ void IMDebugConfigurationSum(INT_FEATURE FeatureNum,
196196
uint8_t *FeatureEvidence,
197197
int32_t ConfigCount);
198198

199-
void HeapSort (int n, register int ra[], register int rb[]);
199+
void HeapSort (int n, int ra[], int rb[]);
200200

201201
/**----------------------------------------------------------------------------
202202
Global Data Definitions and Declarations

src/classify/intproto.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ FLOAT32 BucketEnd(int Bucket, FLOAT32 Offset, int NumBuckets);
131131

132132
void DoFill(FILL_SPEC *FillSpec,
133133
CLASS_PRUNER_STRUCT* Pruner,
134-
register uint32_t ClassMask,
135-
register uint32_t ClassCount,
136-
register uint32_t WordIndex);
134+
uint32_t ClassMask,
135+
uint32_t ClassCount,
136+
uint32_t WordIndex);
137137

138138
BOOL8 FillerDone(TABLE_FILLER *Filler);
139139

@@ -1180,9 +1180,9 @@ FLOAT32 BucketEnd(int Bucket, FLOAT32 Offset, int NumBuckets) {
11801180
*/
11811181
void DoFill(FILL_SPEC *FillSpec,
11821182
CLASS_PRUNER_STRUCT* Pruner,
1183-
register uint32_t ClassMask,
1184-
register uint32_t ClassCount,
1185-
register uint32_t WordIndex) {
1183+
uint32_t ClassMask,
1184+
uint32_t ClassCount,
1185+
uint32_t WordIndex) {
11861186
int X, Y, Angle;
11871187
uint32_t OldWord;
11881188

src/classify/normmatch.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct NORM_PROTOS
4646
/*----------------------------------------------------------------------------
4747
Private Function Prototypes
4848
----------------------------------------------------------------------------*/
49-
double NormEvidenceOf(register double NormAdj);
49+
double NormEvidenceOf(double NormAdj);
5050

5151
void PrintNormMatch(FILE *File,
5252
int NumParams,
@@ -181,7 +181,7 @@ void Classify::FreeNormProtos() {
181181
* normalization adjustment. The equation that represents the transform is:
182182
* 1 / (1 + (NormAdj / midpoint) ^ curl)
183183
*/
184-
double NormEvidenceOf(register double NormAdj) {
184+
double NormEvidenceOf(double NormAdj) {
185185
NormAdj /= classify_norm_adj_midpoint;
186186

187187
if (classify_norm_adj_curl == 3)

src/textord/oldbasel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ float ydiffs[] /*output */
955955

956956
int
957957
choose_partition ( //select partition
958-
register float diff, /*diff from spline */
958+
float diff, /*diff from spline */
959959
float partdiffs[], /*diff on all parts */
960960
int lastpart, /*last assigned partition */
961961
float jumplimit, /*new part threshold */

src/textord/oldbasel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ QSPLINE * spline, /*approximating spline */
8989
float ydiffs[] /*output */
9090
);
9191
int choose_partition ( //select partition
92-
register float diff, /*diff from spline */
92+
float diff, /*diff from spline */
9393
float partdiffs[], /*diff on all parts */
9494
int lastpart, /*last assigned partition */
9595
float jumplimit, /*new part threshold */

src/training/mergenf.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ FLOAT32 SubfeatureEvidence (
8383
PROTO Proto);
8484

8585
double EvidenceOf (
86-
register double Similarity);
86+
double Similarity);
8787

8888
BOOL8 DummyFastMatch (
8989
FEATURE Feature,

src/wordrec/gradechop.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace tesseract {
4848
* 0 = "perfect"
4949
* 100 = "no way jay"
5050
**********************************************************************/
51-
PRIORITY Wordrec::grade_split_length(register SPLIT *split) {
51+
PRIORITY Wordrec::grade_split_length(SPLIT *split) {
5252
PRIORITY grade;
5353
float split_length;
5454

@@ -71,7 +71,7 @@ PRIORITY Wordrec::grade_split_length(register SPLIT *split) {
7171
* 0 = "perfect"
7272
* 100 = "no way jay"
7373
**********************************************************************/
74-
PRIORITY Wordrec::grade_sharpness(register SPLIT *split) {
74+
PRIORITY Wordrec::grade_sharpness(SPLIT *split) {
7575
PRIORITY grade;
7676

7777
grade = point_priority (split->point1) + point_priority (split->point2);

src/wordrec/wordrec.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ class Wordrec : public Classify {
351351
SEAM ** seam, TBLOB * blob);
352352

353353
// gradechop.cpp
354-
PRIORITY grade_split_length(register SPLIT *split);
355-
PRIORITY grade_sharpness(register SPLIT *split);
354+
PRIORITY grade_split_length(SPLIT *split);
355+
PRIORITY grade_sharpness(SPLIT *split);
356356

357357
// outlines.cpp
358358
bool near_point(EDGEPT *point, EDGEPT *line_pt_0, EDGEPT *line_pt_1,

0 commit comments

Comments
 (0)