diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-10-08 12:59:29 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:29:41 +0300 |
commit | 85c4901454324d669ce334a4fe81905742826d93 (patch) | |
tree | 669f5a4bbd510abdd0ff8922d7e1ca86f65319f7 /map/country_tree.cpp | |
parent | 36a4cd1125e13d11532d0164986360c4977a6aad (diff) |
bug fix
Diffstat (limited to 'map/country_tree.cpp')
-rw-r--r-- | map/country_tree.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/map/country_tree.cpp b/map/country_tree.cpp index 1bba7ec69b..4a19f05e20 100644 --- a/map/country_tree.cpp +++ b/map/country_tree.cpp @@ -102,7 +102,7 @@ int CountryTree::GetChildCount() const bool CountryTree::IsLeaf(int childPosition) const { - return GetStorage().CountriesCount(GetChild(childPosition)); + return GetStorage().CountriesCount(GetChild(childPosition)) == 0; } string const & CountryTree::GetChildName(int position) const @@ -217,7 +217,7 @@ void CountryTree::SetRoot(TIndex const & newIndex) TIndex const & CountryTree::GetChild(int childPosition) const { - ASSERT(ChildItemsOffset + childPosition < GetChildCount(), ()); + ASSERT(childPosition < GetChildCount(), ()); return m_levelItems[ChildItemsOffset + childPosition]; } |