Skip to content
Snippets Groups Projects
Commit a9b82b9d authored by Nat Goodspeed's avatar Nat Goodspeed Committed by Andrey Lihatskiy
Browse files

SL-15393: Use non-overloaded name for function returning LLSD&.

parent 089743ac
Branches
No related tags found
No related merge requests found
...@@ -101,7 +101,7 @@ void storeToLLSDPath(LLSD& dest, const LLSD& path, const LLSD& value) ...@@ -101,7 +101,7 @@ void storeToLLSDPath(LLSD& dest, const LLSD& path, const LLSD& value)
} }
// Drill down to where we should store 'value'. // Drill down to where we should store 'value'.
llsd::drill(dest, path) = value; llsd::drill_ref(dest, path) = value;
} }
} // anonymous } // anonymous
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "linden_common.h" #include "linden_common.h"
#include "llsdutil.h" #include "llsdutil.h"
#include <sstream>
#if LL_WINDOWS #if LL_WINDOWS
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
...@@ -862,7 +863,7 @@ bool llsd_equals(const LLSD& lhs, const LLSD& rhs, int bits) ...@@ -862,7 +863,7 @@ bool llsd_equals(const LLSD& lhs, const LLSD& rhs, int bits)
namespace llsd namespace llsd
{ {
LLSD& drill(LLSD& blob, const LLSD& rawPath) LLSD& drill_ref(LLSD& blob, const LLSD& rawPath)
{ {
// Treat rawPath uniformly as an array. If it's not already an array, // Treat rawPath uniformly as an array. If it's not already an array,
// store it as the only entry in one. (But let's say Undefined means an // store it as the only entry in one. (But let's say Undefined means an
...@@ -917,9 +918,9 @@ LLSD& drill(LLSD& blob, const LLSD& rawPath) ...@@ -917,9 +918,9 @@ LLSD& drill(LLSD& blob, const LLSD& rawPath)
LLSD drill(const LLSD& blob, const LLSD& path) LLSD drill(const LLSD& blob, const LLSD& path)
{ {
// non-const drill() does exactly what we want. Temporarily cast away // drill_ref() does exactly what we want. Temporarily cast away
// const-ness and use that. // const-ness and use that.
return drill(const_cast<LLSD&>(blob), path); return drill_ref(const_cast<LLSD&>(blob), path);
} }
} // namespace llsd } // namespace llsd
......
...@@ -184,10 +184,10 @@ namespace llsd ...@@ -184,10 +184,10 @@ namespace llsd
* - Anything else is an error. * - Anything else is an error.
* *
* By implication, if path.isUndefined() or otherwise equivalent to an empty * By implication, if path.isUndefined() or otherwise equivalent to an empty
* LLSD::Array, drill() returns 'blob' as is. * LLSD::Array, drill[_ref]() returns 'blob' as is.
*/ */
LLSD drill(const LLSD& blob, const LLSD& path); LLSD drill(const LLSD& blob, const LLSD& path);
LLSD& drill( LLSD& blob, const LLSD& path); LLSD& drill_ref( LLSD& blob, const LLSD& path);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment