Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/coding
diff options
context:
space:
mode:
authortatiana-yan <tatiana.kondakova@gmail.com>2018-12-20 13:40:53 +0300
committermpimenov <mpimenov@users.noreply.github.com>2018-12-28 15:24:56 +0300
commit986dd8d6a85012e84933e5735ddce9194e3821f1 (patch)
treead99fddd941d2ee5fcf5d54af9a05b8b6439e6af /coding
parent8fe258101a7847df06623106d5359265ce18d9cc (diff)
[search][generator] Store corresponding street feature id as street identifier in HouseToStreetTable.
Diffstat (limited to 'coding')
-rw-r--r--coding/map_uint32_to_val.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/coding/map_uint32_to_val.hpp b/coding/map_uint32_to_val.hpp
index dde0f9095a..dd6606937b 100644
--- a/coding/map_uint32_to_val.hpp
+++ b/coding/map_uint32_to_val.hpp
@@ -183,6 +183,7 @@ public:
// Loads MapUint32ToValue instance. Note that |reader| must be alive
// until the destruction of loaded table. Returns nullptr if
// MapUint32ToValue can't be loaded.
+ // It's guaranteed that |readBlockCallback| will not be called for empty block.
static std::unique_ptr<MapUint32ToValue> Load(Reader & reader,
ReadBlockCallback const & readBlockCallback)
{
@@ -278,6 +279,7 @@ public:
m_ids.push_back(id);
}
+ // It's guaranteed that |writeBlockCallback| will not be called for empty block.
void Freeze(Writer & writer, WriteBlockCallback const & writeBlockCallback) const
{
typename Map::Header header;
@@ -306,6 +308,7 @@ public:
offsets.push_back(static_cast<uint32_t>(variables.size()));
auto const endOffset = min(i + Map::kBlockSize, m_values.size());
+ CHECK_GREATER(endOffset, i, ());
writeBlockCallback(writer, m_values.cbegin() + i, m_values.cbegin() + endOffset);
}
}