diff options
author | Yuri Gorshenin <y@maps.me> | 2016-07-05 12:45:59 +0300 |
---|---|---|
committer | Yuri Gorshenin <y@maps.me> | 2016-07-05 13:51:50 +0300 |
commit | 910c6b0ccfb99f6a5752f8d54f4254b096136041 (patch) | |
tree | c7f4bdacef9a204a49be3f6f855a70356ee61b15 | |
parent | 7df300bc547e7fbb845ff3cedf95d27b61a7ad73 (diff) |
Review fixes.
-rw-r--r-- | base/base_tests/ref_counted_tests.cpp | 11 | ||||
-rw-r--r-- | search/geocoder_context.hpp | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/base/base_tests/ref_counted_tests.cpp b/base/base_tests/ref_counted_tests.cpp index de27a7c01f..f1863eb499 100644 --- a/base/base_tests/ref_counted_tests.cpp +++ b/base/base_tests/ref_counted_tests.cpp @@ -8,7 +8,8 @@ namespace { struct Resource : public RefCounted { - Resource(bool & destroyed) : m_destroyed(destroyed) {} + Resource(bool & destroyed) : m_destroyed(destroyed) { m_destroyed = false; } + ~Resource() override { m_destroyed = true; } bool & m_destroyed; @@ -21,7 +22,7 @@ UNIT_TEST(RefCounted_Smoke) } { - bool destroyed = false; + bool destroyed; { RefCountPtr<Resource> p(new Resource(destroyed)); TEST_EQUAL(1, p->NumRefs(), ()); @@ -31,7 +32,7 @@ UNIT_TEST(RefCounted_Smoke) } { - bool destroyed = false; + bool destroyed; { RefCountPtr<Resource> a(new Resource(destroyed)); TEST_EQUAL(1, a->NumRefs(), ()); @@ -67,10 +68,6 @@ UNIT_TEST(RefCounted_Smoke) TEST_EQUAL(a.Get(), d.Get(), ()); TEST_EQUAL(2, a->NumRefs(), ()); TEST(!destroyed, ()); - - TEST_EQUAL(a.Get(), d.Get(), ()); - TEST_EQUAL(2, a->NumRefs(), ()); - TEST(!destroyed, ()); } TEST(destroyed, ()); } diff --git a/search/geocoder_context.hpp b/search/geocoder_context.hpp index 3954416af6..63b7d4696f 100644 --- a/search/geocoder_context.hpp +++ b/search/geocoder_context.hpp @@ -25,6 +25,8 @@ struct BaseContext // Counts number of groups of consecutive unused tokens. size_t NumUnusedTokenGroups() const; + // List of bit-vectors of features, where i-th element of the list + // corresponds to the i-th token in the search query. vector<CBV> m_features; CBV m_villages; CBV m_streets; |