We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9e0bc9 commit 55732f7Copy full SHA for 55732f7
indra/llcommon/llsdjson.cpp
@@ -63,15 +63,16 @@ LLSD LlsdFromJson(const boost::json::value& val)
63
case boost::json::kind::array:
64
{
65
result = LLSD::emptyArray();
66
- auto& array = val.as_array();
+ const boost::json::array& array = val.as_array();
67
+ size_t size = array.size();
68
// allocate elements 0 .. (size() - 1) to avoid incremental allocation
69
if (! array.empty())
70
- result[array.size() - 1] = LLSD();
71
+ result[size - 1] = LLSD();
72
}
- for (const auto &element : array)
73
+ for (size_t i = 0; i < size; i++)
74
- result.append(LlsdFromJson(element));
75
+ result[i] = (LlsdFromJson(array[i]));
76
77
break;
78
0 commit comments