Skip to content

Commit

Permalink
classify: Remove unused ContextsSeen
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed May 1, 2017
1 parent b9dff16 commit 80fdb63
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
7 changes: 0 additions & 7 deletions classify/adaptive.cpp
Expand Up @@ -21,7 +21,6 @@
----------------------------------------------------------------------------*/
#include "adaptive.h"
#include "emalloc.h"
#include "freelist.h"
#include "globals.h"
#include "classify.h"

Expand Down Expand Up @@ -81,11 +80,8 @@ void AddAdaptedClass(ADAPT_TEMPLATES Templates,
*/
void FreeTempConfig(TEMP_CONFIG Config) {
assert (Config != NULL);

destroy_nodes (Config->ContextsSeen, memfree);
FreeBitVector (Config->Protos);
free(Config);

} /* FreeTempConfig */

/*---------------------------------------------------------------------------*/
Expand Down Expand Up @@ -231,7 +227,6 @@ TEMP_CONFIG NewTempConfig(int MaxProtoId, int FontinfoId) {
Config->NumTimesSeen = 1;
Config->MaxProtoId = MaxProtoId;
Config->ProtoVectorSize = WordsInVectorOfSize (NumProtos);
Config->ContextsSeen = NIL_LIST;
zero_all_bits (Config->Protos, Config->ProtoVectorSize);
Config->FontinfoId = FontinfoId;

Expand Down Expand Up @@ -547,8 +542,6 @@ void WritePermConfig(FILE *File, PERM_CONFIG Config) {
*/
void WriteTempConfig(FILE *File, TEMP_CONFIG Config) {
assert (Config != NULL);
/* contexts not yet implemented */
assert (Config->ContextsSeen == NULL);

fwrite ((char *) Config, sizeof (TEMP_CONFIG_STRUCT), 1, File);
fwrite ((char *) Config->Protos, sizeof (uinT32),
Expand Down
1 change: 0 additions & 1 deletion classify/adaptive.h
Expand Up @@ -41,7 +41,6 @@ typedef struct
uinT8 NumTimesSeen;
uinT8 ProtoVectorSize;
PROTO_ID MaxProtoId;
LIST ContextsSeen;
BIT_VECTOR Protos;
int FontinfoId; // font information inferred from pre-trained templates
} TEMP_CONFIG_STRUCT;
Expand Down

0 comments on commit 80fdb63

Please sign in to comment.