Browse Source

efficiency, use reference instead of copy

cl-refactor
CJentzsch 10 years ago
parent
commit
98eb72dc14
  1. 4
      test/trie.cpp

4
test/trie.cpp

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

Loading…
Cancel
Save