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/base
diff options
context:
space:
mode:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2016-04-27 19:44:11 +0300
committerAlex Zolotarev <alex@maps.me>2016-05-01 10:28:03 +0300
commit9d7fc9dbbe1a2fc816c5afa049b8eab4f827bb2c (patch)
tree3727ff3da3c9ba50a26d7671093c3a4d7d4e44bf /base
parent920f2577a35aba443ee33abf36050f7d0c66a505 (diff)
[ios] Implemented new category search.
Diffstat (limited to 'base')
-rw-r--r--base/mem_trie.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/base/mem_trie.hpp b/base/mem_trie.hpp
index 7cf7678e11..7c2a0eb7f2 100644
--- a/base/mem_trie.hpp
+++ b/base/mem_trie.hpp
@@ -21,7 +21,13 @@ public:
other.m_numNodes = 0;
}
- MemTrie & operator=(MemTrie && other) = default;
+ MemTrie & operator=(MemTrie && other)
+ {
+ m_root = move(other.m_root);
+ m_numNodes = other.m_numNodes;
+ other.m_numNodes = 0;
+ return *this;
+ }
// Adds a key-value pair to the trie.
void Add(TString const & key, TValue const & value)
@@ -63,14 +69,14 @@ private:
Node(Node && other) = default;
- Node & operator=(Node && other) = default;
-
~Node()
{
for (auto const & move : m_moves)
delete move.second;
}
+ Node & operator=(Node && other) = default;
+
Node * GetMove(TChar const & c, size_t & numNewNodes)
{
numNewNodes = 0;