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
path: root/coding
diff options
context:
space:
mode:
authorYury Melnichek <melnichek@gmail.com>2012-06-27 02:31:52 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:40:17 +0300
commitc6642bfc6517cb2e738a20cb4fc1f2c6c26f5168 (patch)
tree178369f38b73f855c4459d9431434b897b021eb1 /coding
parent7c39c46830edc1956671d4cc9191143197e26c41 (diff)
Fix trie_test.cpp
Diffstat (limited to 'coding')
-rw-r--r--coding/coding_tests/trie_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/coding/coding_tests/trie_test.cpp b/coding/coding_tests/trie_test.cpp
index 96f11eb9da..128548937e 100644
--- a/coding/coding_tests/trie_test.cpp
+++ b/coding/coding_tests/trie_test.cpp
@@ -215,7 +215,8 @@ UNIT_TEST(TrieBuilder_Build)
uint32_t expectedMaxEdgeValue = 0;
for (size_t i = 0; i < v.size(); ++i)
- expectedMaxEdgeValue = max(expectedMaxEdgeValue, v[i].m_value);
+ if (!v[i].m_key.empty())
+ expectedMaxEdgeValue = max(expectedMaxEdgeValue, v[i].m_value);
uint32_t maxEdgeValue = 0;
for (uint32_t i = 0; i < root->m_edge.size(); ++i)
maxEdgeValue = max(maxEdgeValue, static_cast<uint32_t>(root->m_edge[i].m_value.m_data[0]));