summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsd.h
diff options
context:
space:
mode:
authorKent Quirk <q@lindenlab.com>2009-12-01 20:59:08 -0500
committerKent Quirk <q@lindenlab.com>2009-12-01 20:59:08 -0500
commitf496c2b164a100836d74909c3e27adcdf98018f0 (patch)
tree25815a00164d3711e496e6bf751bdc947d0e41fd /indra/llcommon/llsd.h
parent2f0b1d164a939d73aae099c9a3a7eaf76f504eaa (diff)
DEV-43622 : API change (no functionality change) to fix a design error in LLSD
I made it about a year and a half ago; Zero found it while reading code. I had added a return value to LLSD::insert(), but a) did it wrong, and b) broke the STL-like semantics of insert(). So I've put insert() back to returning void and created LLSD::with(), which does what my earlier insert() did. The compiler then caught all the cases where insert()'s return value were being used, and I changed those to use with() instead.
Diffstat (limited to 'indra/llcommon/llsd.h')
-rw-r--r--indra/llcommon/llsd.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index 552bb57498..135133c19c 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -223,8 +223,9 @@ public:
bool has(const String&) const;
LLSD get(const String&) const;
- LLSD& insert(const String&, const LLSD&);
+ void insert(const String&, const LLSD&);
void erase(const String&);
+ LLSD& with(const String&, const LLSD&);
LLSD& operator[](const String&);
LLSD& operator[](const char* c) { return (*this)[String(c)]; }
@@ -238,9 +239,10 @@ public:
LLSD get(Integer) const;
void set(Integer, const LLSD&);
- LLSD& insert(Integer, const LLSD&);
+ void insert(Integer, const LLSD&);
void append(const LLSD&);
void erase(Integer);
+ LLSD& with(Integer, const LLSD&);
const LLSD& operator[](Integer) const;
LLSD& operator[](Integer);