Skip to content

Commit

Permalink
ocrfeatures: Remove locally used functions from global interface
Browse files Browse the repository at this point in the history
ReadFeature, WriteFeature are only used locally.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jun 17, 2019
1 parent a3593d9 commit 2c78735
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/classify/ocrfeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ FEATURE_SET NewFeatureSet(int NumFeatures) {
* @param FeatureDesc specifies type of feature to read from File
* @return New #FEATURE read from File.
*/
FEATURE ReadFeature(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc) {
static FEATURE ReadFeature(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc) {
FEATURE Feature;
int i;

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

FEATURE_SET FeatureSet = NewFeatureSet(NumFeatures);
for (int i = 0; i < NumFeatures; i++)
AddFeature(FeatureSet, ReadFeature (File, FeatureDesc));
AddFeature(FeatureSet, ReadFeature(File, FeatureDesc));

return FeatureSet;
}
Expand All @@ -159,7 +159,7 @@ FEATURE_SET ReadFeatureSet(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc) {
* @param Feature feature to write out to str
* @param str string to write Feature to
*/
void WriteFeature(FEATURE Feature, STRING* str) {
static void WriteFeature(FEATURE Feature, STRING* str) {
for (int i = 0; i < Feature->Type->NumParams; i++) {
#ifndef WIN32
assert(!std::isnan(Feature->Params[i]));
Expand Down
4 changes: 0 additions & 4 deletions src/classify/ocrfeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,8 @@ FEATURE NewFeature(const FEATURE_DESC_STRUCT* FeatureDesc);

FEATURE_SET NewFeatureSet(int NumFeatures);

FEATURE ReadFeature(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc);

FEATURE_SET ReadFeatureSet(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc);

void WriteFeature(FEATURE Feature, STRING* str);

void WriteFeatureSet(FEATURE_SET FeatureSet, STRING* str);

#endif

0 comments on commit 2c78735

Please sign in to comment.