diff options
Diffstat (limited to 'libartbase/base/bit_table.h')
-rw-r--r-- | libartbase/base/bit_table.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libartbase/base/bit_table.h b/libartbase/base/bit_table.h index 07e6b27135..227f5eb082 100644 --- a/libartbase/base/bit_table.h +++ b/libartbase/base/bit_table.h @@ -92,7 +92,7 @@ class BitTableBase { bool Equals(const BitTableBase& other) const { return num_rows_ == other.num_rows_ && std::equal(column_offset_, column_offset_ + kNumColumns, other.column_offset_) && - BitMemoryRegion::Compare(table_data_, other.table_data_) == 0; + BitMemoryRegion::Equals(table_data_, other.table_data_); } protected: @@ -449,9 +449,10 @@ class BitmapTableBuilder { // Write table data. for (MemoryRegion row : rows_) { - BitMemoryRegion src(row); + size_t bits_to_copy = std::min(max_num_bits_, row.size_in_bits()); + BitMemoryRegion src(row, /*bit_offset=*/ 0u, bits_to_copy); BitMemoryRegion dst = out.Allocate(max_num_bits_); - dst.StoreBits(/* bit_offset */ 0, src, std::min(max_num_bits_, src.size_in_bits())); + dst.Subregion(/*bit_offset=*/ 0, bits_to_copy).CopyBits(src); } // Verify the written data. |