summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llsdjson.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llcommon/llsdjson.cpp b/indra/llcommon/llsdjson.cpp
index 1df2a8f9eb..655869a704 100644
--- a/indra/llcommon/llsdjson.cpp
+++ b/indra/llcommon/llsdjson.cpp
@@ -63,15 +63,16 @@ LLSD LlsdFromJson(const boost::json::value& val)
case boost::json::kind::array:
{
result = LLSD::emptyArray();
- auto& array = val.as_array();
+ const boost::json::array& array = val.as_array();
+ size_t size = array.size();
// allocate elements 0 .. (size() - 1) to avoid incremental allocation
if (! array.empty())
{
- result[array.size() - 1] = LLSD();
+ result[size - 1] = LLSD();
}
- for (const auto &element : array)
+ for (size_t i = 0; i < size; i++)
{
- result.append(LlsdFromJson(element));
+ result[i] = (LlsdFromJson(array[i]));
}
break;
}