mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
bitset: fix compiler error
This commit is contained in:
parent
2ac5c221ee
commit
842df7c496
1 changed files with 3 additions and 3 deletions
|
@ -51,7 +51,7 @@ void bitset_set_value(struct bitset *b, uintmax_t val)
|
||||||
{
|
{
|
||||||
bitset_clear_all(b);
|
bitset_clear_all(b);
|
||||||
|
|
||||||
for (size_t i = 0; i < b->dim; i++) {
|
for (size_t i = 0; i < b->dimension; i++) {
|
||||||
if (val & (1 << i))
|
if (val & (1 << i))
|
||||||
bitset_set(b, i);
|
bitset_set(b, i);
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ uintmax_t bitset_get_value(struct bitset *b)
|
||||||
{
|
{
|
||||||
uintmax_t v = 0;
|
uintmax_t v = 0;
|
||||||
|
|
||||||
for (size_t i = 0; i < b->dim; i++)
|
for (size_t i = 0; i < b->dimension; i++)
|
||||||
v += bitset_test(b, i) << i;
|
v += bitset_test(b, i) << i;
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
|
@ -71,7 +71,7 @@ size_t bitset_count(struct bitset *b)
|
||||||
{
|
{
|
||||||
size_t cnt = 0;
|
size_t cnt = 0;
|
||||||
|
|
||||||
for (size_t i = 0; i < b->dim; i++)
|
for (size_t i = 0; i < b->dimension; i++)
|
||||||
cnt += bitset_test(b, i);
|
cnt += bitset_test(b, i);
|
||||||
|
|
||||||
return cnt;
|
return cnt;
|
||||||
|
|
Loading…
Add table
Reference in a new issue