OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-link-grammar commits / dc9426b

table_lookup(): On !USE_TABLE_TRACON, return Count_bin type
The value of the w_count_bin type argument (c) is already clamed, so the table value should be the same. But using the count_bin type value (*e) avoids a warning of possible loss of data (64 -32 bit conversion) that is enabled by default on Windows.
dc9426b815cd0dd92673a3e09d188d995129ec97
by ampli <amirpli@gmail.com> · 2024-05-29T23:42:41.000Z

Changed files (1) +1 -1

link-grammar/parse/count.c +1 -1
……@@ -579,7 +579,7 @@ static Count_bin table_store(count_context_t *ctxt,
579579 assert((hist_total(&c) == hist_total(e)),
580580 "Inconsistent count for w(%d,%d) tracon_id(%d,%d): %zd != %zd",
581581 lw, rw, l_id, r_id, (ssize_t)hist_total(&c), (ssize_t)hist_total(e));
582 return c;
582 return *e;
583583 }
584584
585585 // The count is still stored, for the above consistency check