forked from organicmaps/organicmaps
Read non OSRM node from index fix.
This commit is contained in:
parent
c8605dad6c
commit
18c0057d58
2 changed files with 3 additions and 0 deletions
|
@ -445,6 +445,8 @@ TNodesList const & OsrmFtSegBackwardIndex::GetNodeIdByFid(const uint32_t fid) co
|
|||
ASSERT(m_table, ());
|
||||
size_t const index = m_table->GetFeatureIndexbyOffset(fid);
|
||||
ASSERT_LESS(index, m_table->size(), ("Can't find feature index in offsets table"));
|
||||
if (!m_rankIndex[index])
|
||||
return kEmptyList;
|
||||
size_t node_index = m_rankIndex.rank(index);
|
||||
ASSERT_LESS(node_index, m_nodeIds.size(), ());
|
||||
return m_nodeIds[node_index];
|
||||
|
|
|
@ -101,6 +101,7 @@ class OsrmFtSegBackwardIndex
|
|||
succinct::rs_bit_vector m_rankIndex;
|
||||
vector<TNodesList> m_nodeIds;
|
||||
unique_ptr<feature::FeaturesOffsetsTable> m_table;
|
||||
const TNodesList kEmptyList;
|
||||
|
||||
unique_ptr<MmapReader> m_mappedBits;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue