Skip to content

Commit

Permalink
renaming the anon struct
Browse files Browse the repository at this point in the history
  • Loading branch information
nirandaperera committed Jul 30, 2021
1 parent fe0b1ec commit 85fc161
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions cpp/src/arrow/util/bitmap_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class BitmapWordReader {
if (nwords_ > 0) {
current_data.word_ = load<Word>(bitmap_);
} else if (length > 0) {
current_data.byte_ = load<uint8_t>(bitmap_);
current_data.epi.byte_ = load<uint8_t>(bitmap_);
}
}

Expand Down Expand Up @@ -213,12 +213,12 @@ class BitmapWordReader {
} else {
++bitmap_;
const uint8_t next_byte = load<uint8_t>(bitmap_);
byte = current_data.byte_;
byte = current_data.epi.byte_;
if (may_have_byte_offset && offset_) {
byte >>= offset_;
byte |= next_byte << (8 - offset_);
}
current_data.byte_ = next_byte;
current_data.epi.byte_ = next_byte;
trailing_bits_ -= 8;
trailing_bytes_--;
valid_bits = 8;
Expand All @@ -244,7 +244,7 @@ class BitmapWordReader {
uint8_t padding_bytes_[sizeof(Word) - 1];
#endif
uint8_t byte_;
};
} epi;
} current_data;

template <typename DType>
Expand Down
10 changes: 5 additions & 5 deletions cpp/src/arrow/util/bitmap_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class BitmapWordWriter {
if (length >= static_cast<int>(sizeof(Word) * 8)) {
current_data.word_ = load<Word>(bitmap_);
} else if (length > 0) {
current_data.byte_ = load<uint8_t>(bitmap_);
current_data.epi.byte_ = load<uint8_t>(bitmap_);
}
}
}
Expand Down Expand Up @@ -229,11 +229,11 @@ class BitmapWordWriter {
if (may_have_byte_offset && offset_) {
byte = (byte << offset_) | (byte >> (8 - offset_));
uint8_t next_byte = load<uint8_t>(bitmap_ + 1);
current_data.byte_ = (current_data.byte_ & mask_) | (byte & ~mask_);
current_data.epi.byte_ = (current_data.epi.byte_ & mask_) | (byte & ~mask_);
next_byte = (next_byte & ~mask_) | (byte & mask_);
store<uint8_t>(bitmap_, current_data.byte_);
store<uint8_t>(bitmap_, current_data.epi.byte_);
store<uint8_t>(bitmap_ + 1, next_byte);
current_data.byte_ = next_byte;
current_data.epi.byte_ = next_byte;
} else {
store<uint8_t>(bitmap_, byte);
}
Expand Down Expand Up @@ -265,7 +265,7 @@ class BitmapWordWriter {
uint8_t padding_bytes_[sizeof(Word) - 1];
#endif
uint8_t byte_;
};
} epi;
} current_data;

template <typename DType>
Expand Down

0 comments on commit 85fc161

Please sign in to comment.