efficiency, use reference instead of copy

This commit is contained in:
CJentzsch 2014-12-12 09:10:17 +01:00
parent 6a91ed0c1c
commit 2a4e8228d7

View File

@ -67,10 +67,10 @@ BOOST_AUTO_TEST_CASE(trie_tests)
cnote << i.first; cnote << i.first;
js::mObject& o = i.second.get_obj(); js::mObject& o = i.second.get_obj();
vector<pair<string, string>> ss; vector<pair<string, string>> ss;
for (auto i: o["in"].get_array()) for (auto& i: o["in"].get_array())
{ {
vector<string> values; vector<string> values;
for (auto s: i.get_array()) for (auto& s: i.get_array())
values.push_back(s.get_str()); values.push_back(s.get_str());
assert(values.size() == 2); assert(values.size() == 2);