diff --git a/cutil/bitvec.h b/cutil/bitvec.h index bfcc3a55..77f80c1f 100644 --- a/cutil/bitvec.h +++ b/cutil/bitvec.h @@ -18,11 +18,13 @@ #ifndef BITVEC_H #define BITVEC_H +#include "host.h" + /**---------------------------------------------------------------------------- Include Files and Type Defines ----------------------------------------------------------------------------**/ #define BITSINLONG 32 /*no of bits in a long */ -typedef unsigned int *BIT_VECTOR; +typedef uinT32 *BIT_VECTOR; /**---------------------------------------------------------------------------- Public Function Prototypes @@ -67,9 +69,7 @@ BIT_VECTOR ExpandBitVector(BIT_VECTOR Vector, int NewNumBits); void FreeBitVector(BIT_VECTOR BitVector); -int hamming_distance(register unsigned long *array1, - register unsigned long *array2, - register int length); +int hamming_distance(uinT32* array1, uinT32* array2, int length); BIT_VECTOR NewBitVector(int NumBits); /* diff --git a/wordrec/bestfirst.cpp b/wordrec/bestfirst.cpp index efdb6d94..4c363230 100644 --- a/wordrec/bestfirst.cpp +++ b/wordrec/bestfirst.cpp @@ -26,6 +26,8 @@ /*---------------------------------------------------------------------- I n c l u d e s ---------------------------------------------------------------------*/ +#include + #include "bestfirst.h" #include "heuristic.h" #include "plotseg.h" @@ -166,9 +168,9 @@ void delete_search(SEARCH_RECORD *the_search) { float closeness; closeness = (the_search->num_joints ? - (hamming_distance ((unsigned long *) the_search->first_state, - (unsigned long *) the_search->best_state, - 2) / (float) the_search->num_joints) : 0.0); + (hamming_distance(reinterpret_cast(the_search->first_state), + reinterpret_cast(the_search->best_state), 2) / + (float) the_search->num_joints) : 0.0f); record_search_status (the_search->num_states, the_search->before_best, closeness);