void reserve(size_t new_capacity) {
     if (new_capacity > capacity()) {
         const size_t old_capacity = capacity();
         m_mapping.resize(new_capacity);
         std::fill(data() + old_capacity, data() + new_capacity, osmium::index::empty_value<value_type>());
     }
 }
 size_t capacity() const noexcept {
     return m_mapping.size();
 }
 void close() {
     m_mapping.unmap();
 }
 pointer data() {
     return m_mapping.begin();
 }
 const_pointer data() const {
     return m_mapping.begin();
 }
예제 #6
0
 const T* data() const {
     return m_mapping.begin();
 }
예제 #7
0
 void reserve(size_t new_capacity) {
     if (new_capacity > capacity()) {
         m_mapping.resize(new_capacity);
     }
 }
예제 #8
0
 T* data() {
     return m_mapping.begin();
 }