diff options
author | Maksim Andrianov <maksimandrianov1@gmail.com> | 2019-11-21 17:14:08 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-11-22 17:53:47 +0300 |
commit | c52ab9a34e8d9c098d8276cfa185d524e63d7a1e (patch) | |
tree | 03332a9666bee99bc2ac8f52a7a7879a67fa9be5 /indexer | |
parent | 6844bd758edbd02c8e9d2310f9bafc185672f996 (diff) |
Review fixes
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/feature_data.cpp | 7 |
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; } |