More fixes for C++ compilation proposed by Steffan Webb.
This commit is contained in:
parent
038f836d0d
commit
99e6763c2f
|
@ -324,7 +324,7 @@ static cmph_uint8 bmz8_traverse_critical_nodes_heuristic(bmz8_config_data_t *bmz
|
|||
{
|
||||
if(nunused_g_values == unused_g_values_capacity)
|
||||
{
|
||||
unused_g_values = realloc(unused_g_values, (unused_g_values_capacity + BUFSIZ)*sizeof(cmph_uint8));
|
||||
unused_g_values = (cmph_uint8*)realloc(unused_g_values, (unused_g_values_capacity + BUFSIZ)*sizeof(cmph_uint8));
|
||||
unused_g_values_capacity += BUFSIZ;
|
||||
}
|
||||
unused_g_values[nunused_g_values++] = next_g;
|
||||
|
|
|
@ -116,7 +116,7 @@ cmph_t *brz_new(cmph_config_t *mph, float c)
|
|||
brz->c = c;
|
||||
brz->m = mph->key_source->nkeys;
|
||||
DEBUGP("m: %u\n", brz->m);
|
||||
brz->k = ceil(((float)brz->m)/brz->b);
|
||||
brz->k = (cmph_uint32)ceil(brz->m/((float)brz->b));
|
||||
DEBUGP("k: %u\n", brz->k);
|
||||
brz->size = (cmph_uint8 *) calloc(brz->k, sizeof(cmph_uint8));
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ int main(int argc, char **argv)
|
|||
cmph_config_set_mphf_fd(config, mphf_fd);
|
||||
cmph_config_set_memory_availability(config, memory_availability);
|
||||
cmph_config_set_b(config, b);
|
||||
if(mph_algo == CMPH_BMZ && c >= 2.0) c=1.15;
|
||||
if((mph_algo == CMPH_BMZ || mph_algo == CMPH_BRZ) && c >= 2.0) c=1.15;
|
||||
if (c != 0) cmph_config_set_graphsize(config, c);
|
||||
mphf = cmph_new(config);
|
||||
cmph_config_destroy(config);
|
||||
|
|
Loading…
Reference in New Issue