Skip to content

Commit

Permalink
Remove index <= 7
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed May 21, 2024
1 parent 064a328 commit 270e1a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/arrow/util/bit_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static inline int Log2(uint64_t x) {
template <typename T>
static constexpr uint8_t GetBitMask(T index) {
// DCHECK(index >= 0 && index <= 7);
ARROW_COMPILER_ASSUME(index >= 0 && index <= 7);
ARROW_COMPILER_ASSUME(index >= 0);
return static_cast<uint8_t>(1) << index;
}

Expand All @@ -294,7 +294,7 @@ static constexpr uint8_t GetBitMask(T index) {
template <typename T>
static constexpr uint8_t GetFlippedBitMask(T index) {
// DCHECK(index >= 0 && index <= 7);
ARROW_COMPILER_ASSUME(index >= 0 && index <= 7);
ARROW_COMPILER_ASSUME(index >= 0);
return ~(static_cast<uint8_t>(1) << index);
}

Expand Down

0 comments on commit 270e1a2

Please sign in to comment.