Skip to content

Commit

Permalink
Merge pull request simongog#411 from adriangbrandon/master
Browse files Browse the repository at this point in the history
Fixing function operator[] in dac_vector
  • Loading branch information
simongog authored Sep 18, 2018
2 parents d52aa9a + 0349b1c commit ddb0fbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/sdsl/dac_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,13 @@ class dac_vector
{
uint8_t level = 1;
uint8_t offset = t_b;
size_type result = m_data[i];
value_type result = m_data[i];
const uint64_t* p = m_level_pointer_and_rank.data();
uint64_t ppi = (*p)+i;
while (level < m_max_level and m_overflow[ppi]) {
p += 2;
ppi = *p + (m_overflow_rank(ppi) - *(p-1));
result |= (m_data[ppi] << (offset));
result |= ((value_type) m_data[ppi] << (offset));
++level;
offset += t_b;
}
Expand Down

0 comments on commit ddb0fbb

Please sign in to comment.