Closed k0zmo closed 9 years ago
Use auto or std::pair<const string, Json> (same as value_type) to iterate over map collection. Because there's a type mismatch (no const modifier) each iteration creates a temporary pair.
auto
std::pair<const string, Json>
value_type
const
Thanks, good catch! Can you fill out our CLA at https://opensource.dropbox.com/cla/ and then I can merge this?
Done
Thanks!
Use
auto
orstd::pair<const string, Json>
(same asvalue_type
) to iterate over map collection. Because there's a type mismatch (noconst
modifier) each iteration creates a temporary pair.