From e6a9523d2753da50b164c5a7b08ab80ae79179b9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 31 May 2019 16:36:14 -0400 Subject: SL-11216: Allow llsd::drill() to accept LLSD() as (empty) path. Before this change, you had to literally pass LLSD::emptyArray() to get no-op behavior. --- indra/llcommon/llsdutil.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp index ad27f19e85..ec883130bd 100644 --- a/indra/llcommon/llsdutil.cpp +++ b/indra/llcommon/llsdutil.cpp @@ -691,9 +691,10 @@ namespace llsd LLSD& drill(LLSD& blob, const LLSD& rawPath) { // Treat rawPath uniformly as an array. If it's not already an array, - // store it as the only entry in one. + // store it as the only entry in one. (But let's say Undefined means an + // empty array.) LLSD path; - if (rawPath.isArray()) + if (rawPath.isArray() || rawPath.isUndefined()) { path = rawPath; } -- cgit v1.2.3