From 2a4e8228d7e912febdd6c4570a9143ea9bed11d9 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Fri, 12 Dec 2014 09:10:17 +0100 Subject: efficiency, use reference instead of copy --- trie.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trie.cpp b/trie.cpp index 20399431..b300de33 100644 --- a/trie.cpp +++ b/trie.cpp @@ -67,10 +67,10 @@ BOOST_AUTO_TEST_CASE(trie_tests) cnote << i.first; js::mObject& o = i.second.get_obj(); vector> ss; - for (auto i: o["in"].get_array()) + for (auto& i: o["in"].get_array()) { vector values; - for (auto s: i.get_array()) + for (auto& s: i.get_array()) values.push_back(s.get_str()); assert(values.size() == 2); -- cgit v1.2.3