From 6f3c772939463c97a4a8a8371db42b8f4b181c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 19 Feb 2019 02:31:35 +0100 Subject: No idea, to tired. --- trie.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'trie.h') diff --git a/trie.h b/trie.h index 880716e8..07c1bce3 100644 --- a/trie.h +++ b/trie.h @@ -7,13 +7,11 @@ template struct trie_node { char c; T* value = NULL; - trie_node* next = NULL; - trie_node* child = NULL; + trie_node* next = nullptr; + trie_node* child = nullptr; trie_node (char c); trie_node (char c, trie_node* next, trie_node* child); - - // ~trie_node (); }; template @@ -24,11 +22,10 @@ struct trie { trie_node* root; trie (); - // ~trie (); int push_back (const char* key, const T&); - T& operator[] ( char* key ); + T& operator[] ( const char* key ); bool empty () { return this->root->child == NULL; } }; -- cgit v1.2.3