mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-03 19:26:34 +02:00
Bug fixes
This commit is contained in:
parent
220934f3d3
commit
d2b500278c
2 changed files with 5 additions and 5 deletions
|
@ -144,12 +144,12 @@ int hashset_is_member(hashset_t set, void *item)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void hashset_to_array(hashset_t set, void *items)
|
void hashset_to_array(hashset_t set, void **items)
|
||||||
{
|
{
|
||||||
for (unsigned int hs = 0, a = 0; hs ; set->capacity; hs++) {
|
for (unsigned int hs = 0, a = 0; hs < set->capacity; hs++) {
|
||||||
size_t value = (size_t)item;
|
size_t value = (size_t)set->items[hs];
|
||||||
if (value != 0 && value != 1) {
|
if (value != 0 && value != 1) {
|
||||||
items[a] = set->items[hs];
|
items[a] = (void *)value;
|
||||||
a++;
|
a++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
int hashset_is_member(hashset_t set, void *item);
|
int hashset_is_member(hashset_t set, void *item);
|
||||||
|
|
||||||
void hashset_to_array(hashset_t set, void *items);
|
void hashset_to_array(hashset_t set, void **items);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue