Skip to content
Snippets Groups Projects
Commit bb718155 authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

DRTVWR-575: Replace some LLSDArray() usage with llsd::array().

It seems newer compilers have a different interpretation of exactly when to
engage LLSDArray's copy constructor. In particular, this assignment:

some_LLSD_map[key] = LLSDArray(...)(...)...;

used to convert the LLSDArray object directly to LLSD; now it first calls the
custom copy constructor, which embeds the intended array within an outer array
before assigning it into the containing map.

The newer llsd::array() function avoids that problem because what it returns
is already an LLSD object.

Taking inventory of LLSDArray assignments of that form turned up a number of
workarounds like LLSD(LLSDArray(...)). Replacing those with llsd::array() is
both simpler and more readable.

Tip of the hat to Chorazinallen for surfacing this issue!
parent 7d9249d1
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment