Skip to content
Snippets Groups Projects
Commit 3c77c1b9 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!

(cherry picked from commit bb718155)
parent 7ed52090
No related branches found
No related tags found
No related merge requests found
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