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
diff options
context:
space:
mode:
Diffstat (limited to 'indexer')
-rw-r--r--indexer/altitude_loader.cpp18
-rw-r--r--indexer/altitude_loader.hpp2
-rw-r--r--indexer/feature_altitude.hpp25
-rw-r--r--indexer/feature_loader.hpp1
-rw-r--r--indexer/old/feature_loader_101.hpp1
5 files changed, 18 insertions, 29 deletions
diff --git a/indexer/altitude_loader.cpp b/indexer/altitude_loader.cpp
index d01c719d5d..7109338fcf 100644
--- a/indexer/altitude_loader.cpp
+++ b/indexer/altitude_loader.cpp
@@ -13,9 +13,9 @@
namespace
{
-template<class TCont>
-void LoadAndMap(size_t dataSize, ReaderSource<FilesContainerR::TReader> & src,
- TCont & cont, unique_ptr<CopiedMemoryRegion> & region)
+template <class TCont>
+void LoadAndMap(size_t dataSize, ReaderSource<FilesContainerR::TReader> & src, TCont & cont,
+ unique_ptr<CopiedMemoryRegion> & region)
{
vector<uint8_t> data(dataSize);
src.Read(data.data(), data.size());
@@ -23,13 +23,13 @@ void LoadAndMap(size_t dataSize, ReaderSource<FilesContainerR::TReader> & src,
coding::MapVisitor visitor(region->ImmutableData());
cont.map(visitor);
}
-} // namespace
+} // namespace
namespace feature
{
AltitudeLoader::AltitudeLoader(MwmValue const & mwmValue)
{
- if (mwmValue.GetHeader().GetFormat() < version::Format::v8 )
+ if (mwmValue.GetHeader().GetFormat() < version::Format::v8)
return;
if (!mwmValue.m_cont.IsExist(ALTITUDES_FILE_TAG))
@@ -52,11 +52,7 @@ AltitudeLoader::AltitudeLoader(MwmValue const & mwmValue)
}
}
-bool AltitudeLoader::HasAltitudes() const
-{
- return m_header.m_minAltitude != kInvalidAltitude;
-}
-
+bool AltitudeLoader::HasAltitudes() const { return m_header.m_minAltitude != kInvalidAltitude; }
TAltitudes const & AltitudeLoader::GetAltitudes(uint32_t featureId, size_t pointCount)
{
if (!HasAltitudes())
@@ -98,4 +94,4 @@ TAltitudes const & AltitudeLoader::GetAltitudes(uint32_t featureId, size_t point
return m_cache.insert(make_pair(featureId, m_dummy)).first->second;
}
}
-} // namespace feature
+} // namespace feature
diff --git a/indexer/altitude_loader.hpp b/indexer/altitude_loader.hpp
index cce768df67..15abf0cb73 100644
--- a/indexer/altitude_loader.hpp
+++ b/indexer/altitude_loader.hpp
@@ -31,4 +31,4 @@ private:
TAltitudes const m_dummy;
AltitudeHeader m_header;
};
-} // namespace feature
+} // namespace feature
diff --git a/indexer/feature_altitude.hpp b/indexer/feature_altitude.hpp
index f72966b967..345cb26929 100644
--- a/indexer/feature_altitude.hpp
+++ b/indexer/feature_altitude.hpp
@@ -20,11 +20,7 @@ struct AltitudeHeader
{
using TAltitudeSectionVersion = uint16_t;
- AltitudeHeader()
- {
- Reset();
- }
-
+ AltitudeHeader() { Reset(); }
template <class TSink>
void Serialize(TSink & sink) const
{
@@ -46,10 +42,12 @@ struct AltitudeHeader
}
// Methods below return sizes of parts of altitude section in bytes.
- size_t GetAltitudeAvailabilitySize() const { return m_featureTableOffset - sizeof(AltitudeHeader); }
+ size_t GetAltitudeAvailabilitySize() const
+ {
+ return m_featureTableOffset - sizeof(AltitudeHeader);
+ }
size_t GetFeatureTableSize() const { return m_altitudesOffset - m_featureTableOffset; }
size_t GetAltitudeInfo() const { return m_endOffset - m_altitudesOffset; }
-
void Reset()
{
m_version = 0;
@@ -73,7 +71,6 @@ class Altitudes
public:
Altitudes() = default;
explicit Altitudes(TAltitudes const & altitudes) : m_altitudes(altitudes) {}
-
template <class TSink>
void Serialize(TAltitude minAltitude, TSink & sink) const
{
@@ -81,7 +78,8 @@ public:
WriteVarInt(sink, static_cast<int32_t>(m_altitudes[0]) - static_cast<int32_t>(minAltitude));
for (size_t i = 1; i < m_altitudes.size(); ++i)
- WriteVarInt(sink, static_cast<int32_t>(m_altitudes[i]) - static_cast<int32_t>(m_altitudes[i - 1]));
+ WriteVarInt(sink,
+ static_cast<int32_t>(m_altitudes[i]) - static_cast<int32_t>(m_altitudes[i - 1]));
}
template <class TSource>
@@ -109,17 +107,14 @@ public:
}
}
- TAltitudes GetAltitudes() const
- {
- return m_altitudes;
- }
-
+ TAltitudes GetAltitudes() const { return m_altitudes; }
private:
/// \note |m_altitudes| is a vector of feature point altitudes. There's two possibilities:
/// * |m_altitudes| is empty. It means there is no altitude information for this feature.
/// * size of |m_pointAlt| is equal to the number of this feature's points.
/// In this case the i'th element of |m_pointAlt| corresponds to the altitude of the
- /// i'th point of the feature and is set to kInvalidAltitude when there is no information about the point.
+ /// i'th point of the feature and is set to kInvalidAltitude when there is no information about
+ /// the point.
TAltitudes m_altitudes;
};
} // namespace feature
diff --git a/indexer/feature_loader.hpp b/indexer/feature_loader.hpp
index 7788d05446..f10ad707a0 100644
--- a/indexer/feature_loader.hpp
+++ b/indexer/feature_loader.hpp
@@ -20,7 +20,6 @@ namespace feature
public:
LoaderCurrent(SharedLoadInfo const & info) : BaseT(info) {}
-
/// LoaderBase overrides:
virtual uint8_t GetHeader() override;
void ParseTypes() override;
diff --git a/indexer/old/feature_loader_101.hpp b/indexer/old/feature_loader_101.hpp
index 00f857d2ce..2a7a4184c2 100644
--- a/indexer/old/feature_loader_101.hpp
+++ b/indexer/old/feature_loader_101.hpp
@@ -28,7 +28,6 @@ namespace old_101 { namespace feature
public:
LoaderImpl(::feature::SharedLoadInfo const & info) : BaseT(info) {}
-
/// LoaderBase overrides:
uint8_t GetHeader() override;
void ParseTypes() override;