From 3ebaa5b0a69f7ae63c74bc4a1a80a5ec5b988569 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 23 Jan 2012 11:23:02 -0800 Subject: made add() method chainable on Multiple<> params --- indra/llxuixml/llinitparam.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/llxuixml/llinitparam.h') diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index ab20957760..4ab1d891a3 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -1253,15 +1253,16 @@ namespace LLInitParam return mValues.back(); } - void add(const value_t& item) + self_t& add(const value_t& item) { param_value_t param_value; param_value.setValue(item); mValues.push_back(param_value); setProvided(); + return *this; } - void add(const typename name_value_lookup_t::name_t& name) + self_t& add(const typename name_value_lookup_t::name_t& name) { value_t value; @@ -1271,6 +1272,8 @@ namespace LLInitParam add(value); mValues.back().setValueName(name); } + + return *this; } // implicit conversion @@ -1441,13 +1444,14 @@ namespace LLInitParam return mValues.back(); } - void add(const value_t& item) + self_t& add(const value_t& item) { mValues.push_back(item); setProvided(); + return *this; } - void add(const typename name_value_lookup_t::name_t& name) + self_t& add(const typename name_value_lookup_t::name_t& name) { value_t value; @@ -1457,6 +1461,7 @@ namespace LLInitParam add(value); mValues.back().setValueName(name); } + return *this; } // implicit conversion -- cgit v1.2.3