Skip to content

Commit

Permalink
Review fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpimenov authored and tatiana-yan committed Jul 17, 2019
1 parent d79c103 commit fb5fc14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 1 addition & 3 deletions coding/map_uint32_to_val.hpp
Expand Up @@ -12,7 +12,6 @@
#include "base/assert.hpp"
#include "base/checked_cast.hpp"
#include "base/logging.hpp"
#include "base/macros.hpp"

#if defined(__clang__)
#pragma clang diagnostic push
Expand Down Expand Up @@ -212,8 +211,7 @@ class MapUint32ToValue
auto const j = static_cast<uint32_t>(m_ids.select(i));
Value value;
bool const ok = Get(j, value);
UNUSED_VALUE(ok);
ASSERT(ok, ());
CHECK(ok, ());
fn(j, value);
}
}
Expand Down
11 changes: 5 additions & 6 deletions indexer/feature_to_osm.hpp
Expand Up @@ -110,7 +110,6 @@ class FeatureIdToGeoObjectIdSerDes
static Version const kLatestVersion;
static size_t const kMagicAndVersionSize;
static size_t const kHeaderOffset;
static std::array<base::GeoObjectId::Type, 3> kTypes;

struct HeaderV0
{
Expand Down Expand Up @@ -219,9 +218,9 @@ class FeatureIdToGeoObjectIdSerDes
{
using Type = base::GeoObjectId::Type;
auto const startPos = base::checked_cast<uint32_t>(sink.Pos());
SerializeV0(sink, Type::OsmNode, header.m_nodesOffset, map);
SerializeV0(sink, Type::OsmWay, header.m_waysOffset, map);
SerializeV0(sink, Type::OsmRelation, header.m_relationsOffset, map);
SerializeV0(sink, Type::OsmNode, map, header.m_nodesOffset);
SerializeV0(sink, Type::OsmWay, map, header.m_waysOffset);
SerializeV0(sink, Type::OsmRelation, map, header.m_relationsOffset);

header.m_numEntries = static_cast<uint32_t>(map.Size());

Expand All @@ -232,8 +231,8 @@ class FeatureIdToGeoObjectIdSerDes
}

template <typename Sink>
static void SerializeV0(Sink & sink, base::GeoObjectId::Type type, uint32_t & offset,
FeatureIdToGeoObjectIdBimapMem const & map)
static void SerializeV0(Sink & sink, base::GeoObjectId::Type type,
FeatureIdToGeoObjectIdBimapMem const & map, uint32_t & offset)
{
offset = base::checked_cast<uint32_t>(sink.Pos());
std::vector<std::pair<uint32_t, base::GeoObjectId>> entries;
Expand Down

0 comments on commit fb5fc14

Please sign in to comment.