Skip to content

Commit

Permalink
eliminate_duplicate_disjuncts: unsigned -> connector_hash_t
Browse files Browse the repository at this point in the history
  • Loading branch information
ampli committed May 17, 2024
1 parent d325e3e commit 1b5d1b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions link-grammar/disjunct-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ struct disjunct_dup_table_s
* This is the old version that doesn't check for domination, just
* equality.
*/
static inline unsigned int old_hash_disjunct(disjunct_dup_table *dt,
Disjunct * d, bool string_too)
static inline connector_hash_t old_hash_disjunct(disjunct_dup_table *dt,
Disjunct * d, bool string_too)
{
unsigned int i = 0;
connector_hash_t i = 0;

if (NULL != d->left)
i = connector_list_hash(d->left);
Expand Down Expand Up @@ -365,7 +365,7 @@ unsigned int eliminate_duplicate_disjuncts(Disjunct *dw, bool multi_string)
for (Disjunct *d = dw; d != NULL; d = d->next)
{
Disjunct *dx;
unsigned int h = old_hash_disjunct(dt, d, /*string_too*/!multi_string);
connector_hash_t h = old_hash_disjunct(dt, d, /*string_too*/!multi_string);

for (dx = dt->dup_table[h]; dx != NULL; dx = dx->dup_table_next)
{
Expand Down
2 changes: 1 addition & 1 deletion link-grammar/disjunct-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct Disjunct_struct
/* Shared by different steps. For what | when. */
union
{
uint32_t dup_hash; /* Duplicate elimination | before pruning */
connector_hash_t dup_hash;/* Duplicate elimination | before pruning */
int32_t ordinal; /* Generation mode | after d. elimination */
}; /* 4 bytes */

Expand Down

0 comments on commit 1b5d1b5

Please sign in to comment.