Skip to content

Commit

Permalink
yet another attempt...
Browse files Browse the repository at this point in the history
  • Loading branch information
FAlbertDev committed Jan 11, 2024
1 parent a7c0231 commit bd412b0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib/utils/bitvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,9 @@ class bitvector_base final {
* Sets all currently allocated bits.
*/
bitvector_base& set() {
full_range_operation([](std::unsigned_integral auto block) -> decltype(block) { return ~decltype(block)(0U); },
*this);
full_range_operation(
[](std::unsigned_integral auto block) -> decltype(block) { return static_cast<decltype(block)>(~0U); },
*this);
zero_unused_bits();
return *this;
}
Expand All @@ -454,8 +455,9 @@ class bitvector_base final {
* Unsets all currently allocated bits.
*/
bitvector_base& unset() {
full_range_operation([](std::unsigned_integral auto block) -> decltype(block) { return decltype(block)(0U); },
*this);
full_range_operation(
[](std::unsigned_integral auto block) -> decltype(block) { return static_cast<decltype(block)>(0U); },
*this);
return *this;
}

Expand Down

0 comments on commit bd412b0

Please sign in to comment.