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:
authorMaksim Andrianov <maksimandrianov1@gmail.com>2019-11-21 17:14:08 +0300
committermpimenov <mpimenov@users.noreply.github.com>2019-11-22 17:53:47 +0300
commitc52ab9a34e8d9c098d8276cfa185d524e63d7a1e (patch)
tree03332a9666bee99bc2ac8f52a7a7879a67fa9be5 /indexer
parent6844bd758edbd02c8e9d2310f9bafc185672f996 (diff)
Review fixes
Diffstat (limited to 'indexer')
-rw-r--r--indexer/feature_data.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp
index 2d9395778d..1095d9468d 100644
--- a/indexer/feature_data.cpp
+++ b/indexer/feature_data.cpp
@@ -222,10 +222,7 @@ bool FeatureParamsBase::operator == (FeatureParamsBase const & rhs) const
bool FeatureParamsBase::IsValid() const
{
- if (layer <= LAYER_LOW || layer >= LAYER_HIGH)
- return false;
-
- return true;
+ return layer > LAYER_LOW && layer < LAYER_HIGH;
}
string FeatureParamsBase::DebugString() const
@@ -399,6 +396,7 @@ void FeatureParams::SetGeomTypePointEx()
feature::GeomType FeatureParams::GetGeomType() const
{
+ CHECK(IsValid(), ());
switch (m_geomType)
{
case HeaderGeomType::Line: return GeomType::Line;
@@ -409,6 +407,7 @@ feature::GeomType FeatureParams::GetGeomType() const
HeaderGeomType FeatureParams::GetHeaderGeomType() const
{
+ CHECK(IsValid(), ());
return m_geomType;
}