Skip to content

Commit 2c78735

Browse files
committed
ocrfeatures: Remove locally used functions from global interface
ReadFeature, WriteFeature are only used locally. Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent a3593d9 commit 2c78735

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/classify/ocrfeatures.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ FEATURE_SET NewFeatureSet(int NumFeatures) {
113113
* @param FeatureDesc specifies type of feature to read from File
114114
* @return New #FEATURE read from File.
115115
*/
116-
FEATURE ReadFeature(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc) {
116+
static FEATURE ReadFeature(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc) {
117117
FEATURE Feature;
118118
int i;
119119

@@ -144,7 +144,7 @@ FEATURE_SET ReadFeatureSet(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc) {
144144

145145
FEATURE_SET FeatureSet = NewFeatureSet(NumFeatures);
146146
for (int i = 0; i < NumFeatures; i++)
147-
AddFeature(FeatureSet, ReadFeature (File, FeatureDesc));
147+
AddFeature(FeatureSet, ReadFeature(File, FeatureDesc));
148148

149149
return FeatureSet;
150150
}
@@ -159,7 +159,7 @@ FEATURE_SET ReadFeatureSet(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc) {
159159
* @param Feature feature to write out to str
160160
* @param str string to write Feature to
161161
*/
162-
void WriteFeature(FEATURE Feature, STRING* str) {
162+
static void WriteFeature(FEATURE Feature, STRING* str) {
163163
for (int i = 0; i < Feature->Type->NumParams; i++) {
164164
#ifndef WIN32
165165
assert(!std::isnan(Feature->Params[i]));

src/classify/ocrfeatures.h

-4
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,8 @@ FEATURE NewFeature(const FEATURE_DESC_STRUCT* FeatureDesc);
112112

113113
FEATURE_SET NewFeatureSet(int NumFeatures);
114114

115-
FEATURE ReadFeature(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc);
116-
117115
FEATURE_SET ReadFeatureSet(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc);
118116

119-
void WriteFeature(FEATURE Feature, STRING* str);
120-
121117
void WriteFeatureSet(FEATURE_SET FeatureSet, STRING* str);
122118

123119
#endif

0 commit comments

Comments
 (0)