diff options
author | Yuri Gorshenin <y@maps.me> | 2015-09-03 17:44:52 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:02:13 +0300 |
commit | 5e5befb58ef0b2a424cffdfd102d7d6aa7ffce82 (patch) | |
tree | bb1b73cfc34c906243592b8f4f6272e8820500c9 /coding/succinct_mapper.hpp | |
parent | b4bd3a3e802fc25665b7cbcb2a2af2d45b79913c (diff) |
[indexer] Implemented rank table builder.
Diffstat (limited to 'coding/succinct_mapper.hpp')
-rw-r--r-- | coding/succinct_mapper.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/coding/succinct_mapper.hpp b/coding/succinct_mapper.hpp index a5c288dac0..2c2a774c1c 100644 --- a/coding/succinct_mapper.hpp +++ b/coding/succinct_mapper.hpp @@ -97,9 +97,10 @@ public: vec.clear(); (*this)(vec.m_size, "size"); - vec.m_data = reinterpret_cast<const T *>(m_cur); - for (auto const it = vec.cbegin(); it != vec.cend(); ++it) - *it = ReverseByteOrder(*it); + T * data = reinterpret_cast<T *>(m_cur); + for (uint64_t i = 0; i < vec.m_size; ++i) + data[i] = ReverseByteOrder(data[i]); + vec.m_data = data; m_cur = Align8Ptr(m_cur + vec.m_size * sizeof(T)); return *this; |