aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerländer2016-06-17 19:57:39 +0200
committerGitHub2016-06-17 19:57:39 +0200
commitddafc016d088de3e63087507a44827775aaa2c33 (patch)
tree523973575a9d1992f061954f282170521deee5c6
parent6c14deb5b8e377a7bdc1a44d91458f17a4f24981 (diff)
parentcdbb5934d7522e2e9c966fbfdcaa8d0647bc2c1c (diff)
downloadTrie-master.tar
Trie-master.tar.gz
Trie-master.tar.bz2
Trie-master.tar.lz
Trie-master.tar.xz
Trie-master.tar.zst
Trie-master.zip
Merge pull request #1 from nickcano/patch-1HEADmaster
Evaluation order in this case is unspecified
-rw-r--r--src/trie.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/trie.h b/src/trie.h
index d34912f..1fa698e 100644
--- a/src/trie.h
+++ b/src/trie.h
@@ -77,7 +77,8 @@ class Trie {
typename key_list::const_iterator end
) {
if ( current != end ) {
- return this->children_[*current].add(++current, end);
+ auto element = *current;
+ return this->children_[element].add(++current, end);
} else {
return this;
}