[gnote] Remove std::list from trie



commit 67c2a04e518125964bf180c5620498caa0e664df
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Apr 28 19:29:07 2019 +0300

    Remove std::list from trie

 src/trie.hpp    | 3 +--
 src/triehit.hpp | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/trie.hpp b/src/trie.hpp
index 69d3ef28..db235f97 100644
--- a/src/trie.hpp
+++ b/src/trie.hpp
@@ -22,7 +22,6 @@
 #ifndef __TRIE_HPP_
 #define __TRIE_HPP_
 
-#include <list>
 #include <queue>
 
 #include "triehit.hpp"
@@ -37,7 +36,7 @@ private:
 
   class TrieState;
   typedef TrieState* TrieStatePtr;
-  typedef std::list<TrieStatePtr> TrieStateList;
+  typedef std::deque<TrieStatePtr> TrieStateList;
   typedef std::queue<TrieStatePtr> TrieStateQueue;
 
   class TrieState
diff --git a/src/triehit.hpp b/src/triehit.hpp
index 3610dd4a..d8592e39 100644
--- a/src/triehit.hpp
+++ b/src/triehit.hpp
@@ -22,7 +22,6 @@
 #ifndef __TRIEHIT_HPP_
 #define __TRIEHIT_HPP_
 
-#include <list>
 #include <memory>
 
 #include <glibmm/ustring.h>
@@ -34,7 +33,7 @@ class TrieHit
 {
 public:
   typedef std::shared_ptr<TrieHit> Ptr;
-  typedef std::list<Ptr> List;
+  typedef std::vector<Ptr> List;
   typedef std::shared_ptr<List> ListPtr;
 
   TrieHit(int s, int e, const Glib::ustring & k, const value_t & v)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]