diff options
| author | Rye <rye@alchemyviewer.org> | 2026-01-11 13:38:37 -0500 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-01-21 22:07:08 +0200 |
| commit | 4de1ba776c60e935e8cf069c1aef104ee2b07559 (patch) | |
| tree | f2019f5a9f53f2921dbfbbc576c7ec4e233237ba /indra/llcommon/llsdjson.cpp | |
| parent | 28fee038e0e14e0538eefade38961e9ae1665d81 (diff) | |
Heavily reduce temporary allocations during LLSD parsing operations by utilizing moves and reducing temporary allocations
Diffstat (limited to 'indra/llcommon/llsdjson.cpp')
| -rw-r--r-- | indra/llcommon/llsdjson.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llcommon/llsdjson.cpp b/indra/llcommon/llsdjson.cpp index 655869a704..bb806f32eb 100644 --- a/indra/llcommon/llsdjson.cpp +++ b/indra/llcommon/llsdjson.cpp @@ -66,7 +66,7 @@ LLSD LlsdFromJson(const boost::json::value& val) 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()) + if (!array.empty()) { result[size - 1] = LLSD(); } @@ -80,7 +80,7 @@ LLSD LlsdFromJson(const boost::json::value& val) result = LLSD::emptyMap(); for (const auto& element : val.as_object()) { - result[element.key()] = LlsdFromJson(element.value()); + result[std::string_view(element.key())] = LlsdFromJson(element.value()); } break; } |
