Skip to content

Commit

Permalink
smallset fixes merged
Browse files Browse the repository at this point in the history
  • Loading branch information
joern274 committed Jul 1, 2024
2 parents eff9fc3 + 2011513 commit adfc649
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/hawkeye/src/sbox_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ bool smallset_t::empty() const
for (int i = 0; i < 4; i++)
{
if (dw64[i])
{
return false;
}
}
return true;
}
Expand All @@ -94,7 +96,9 @@ u8 smallset_t::least_bit() const
for (int i = 0; i < 4; i++)
{
if (dw64[i])
{
return i * 64 + least_bit(dw64[i]);
}
}
std::cerr << "Called smallset_t::least_bit() on empty set\n" << std::endl;
return 0;
Expand Down Expand Up @@ -167,7 +171,9 @@ smallset_t smallset_t::shuffle(u8 shift) const
void smallset_t::to_array(u64* arr, bool swap) const
{
for (int i=0; i<4; i++)
{
arr[i] = dw64[swap ? 3-i : i];
}
}

void smallset_t::set(u8 bit)
Expand Down

0 comments on commit adfc649

Please sign in to comment.