mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-28 05:39:35 +08:00
classify: Remove unused ContextsSeen
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
b9dff1607f
commit
80fdb634ba
@ -21,7 +21,6 @@
|
|||||||
----------------------------------------------------------------------------*/
|
----------------------------------------------------------------------------*/
|
||||||
#include "adaptive.h"
|
#include "adaptive.h"
|
||||||
#include "emalloc.h"
|
#include "emalloc.h"
|
||||||
#include "freelist.h"
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "classify.h"
|
#include "classify.h"
|
||||||
|
|
||||||
@ -81,11 +80,8 @@ void AddAdaptedClass(ADAPT_TEMPLATES Templates,
|
|||||||
*/
|
*/
|
||||||
void FreeTempConfig(TEMP_CONFIG Config) {
|
void FreeTempConfig(TEMP_CONFIG Config) {
|
||||||
assert (Config != NULL);
|
assert (Config != NULL);
|
||||||
|
|
||||||
destroy_nodes (Config->ContextsSeen, memfree);
|
|
||||||
FreeBitVector (Config->Protos);
|
FreeBitVector (Config->Protos);
|
||||||
free(Config);
|
free(Config);
|
||||||
|
|
||||||
} /* FreeTempConfig */
|
} /* FreeTempConfig */
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
@ -231,7 +227,6 @@ TEMP_CONFIG NewTempConfig(int MaxProtoId, int FontinfoId) {
|
|||||||
Config->NumTimesSeen = 1;
|
Config->NumTimesSeen = 1;
|
||||||
Config->MaxProtoId = MaxProtoId;
|
Config->MaxProtoId = MaxProtoId;
|
||||||
Config->ProtoVectorSize = WordsInVectorOfSize (NumProtos);
|
Config->ProtoVectorSize = WordsInVectorOfSize (NumProtos);
|
||||||
Config->ContextsSeen = NIL_LIST;
|
|
||||||
zero_all_bits (Config->Protos, Config->ProtoVectorSize);
|
zero_all_bits (Config->Protos, Config->ProtoVectorSize);
|
||||||
Config->FontinfoId = FontinfoId;
|
Config->FontinfoId = FontinfoId;
|
||||||
|
|
||||||
@ -547,8 +542,6 @@ void WritePermConfig(FILE *File, PERM_CONFIG Config) {
|
|||||||
*/
|
*/
|
||||||
void WriteTempConfig(FILE *File, TEMP_CONFIG Config) {
|
void WriteTempConfig(FILE *File, TEMP_CONFIG Config) {
|
||||||
assert (Config != NULL);
|
assert (Config != NULL);
|
||||||
/* contexts not yet implemented */
|
|
||||||
assert (Config->ContextsSeen == NULL);
|
|
||||||
|
|
||||||
fwrite ((char *) Config, sizeof (TEMP_CONFIG_STRUCT), 1, File);
|
fwrite ((char *) Config, sizeof (TEMP_CONFIG_STRUCT), 1, File);
|
||||||
fwrite ((char *) Config->Protos, sizeof (uinT32),
|
fwrite ((char *) Config->Protos, sizeof (uinT32),
|
||||||
|
@ -41,7 +41,6 @@ typedef struct
|
|||||||
uinT8 NumTimesSeen;
|
uinT8 NumTimesSeen;
|
||||||
uinT8 ProtoVectorSize;
|
uinT8 ProtoVectorSize;
|
||||||
PROTO_ID MaxProtoId;
|
PROTO_ID MaxProtoId;
|
||||||
LIST ContextsSeen;
|
|
||||||
BIT_VECTOR Protos;
|
BIT_VECTOR Protos;
|
||||||
int FontinfoId; // font information inferred from pre-trained templates
|
int FontinfoId; // font information inferred from pre-trained templates
|
||||||
} TEMP_CONFIG_STRUCT;
|
} TEMP_CONFIG_STRUCT;
|
||||||
|
Loading…
Reference in New Issue
Block a user