summaryrefslogtreecommitdiff
path: root/indra/llui/llflatlistview.cpp
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/llui/llflatlistview.cpp
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/llui/llflatlistview.cpp')
-rw-r--r--indra/llui/llflatlistview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index ddfb0f8534..f4a5f1c990 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -39,8 +39,8 @@
static const LLDefaultChildRegistry::Register<LLFlatListView> flat_list_view("flat_list_view");
-const LLSD SELECTED_EVENT = LLSD().insert("selected", true);
-const LLSD UNSELECTED_EVENT = LLSD().insert("selected", false);
+const LLSD SELECTED_EVENT = LLSD().with("selected", true);
+const LLSD UNSELECTED_EVENT = LLSD().with("selected", false);
static const std::string COMMENT_TEXTBOX = "comment_text";
@@ -530,7 +530,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
if ( !selectNextItemPair(true, reset_selection) && reset_selection)
{
// If case we are in accordion tab notify parent to go to the previous accordion
- notifyParent(LLSD().insert("action","select_prev"));
+ notifyParent(LLSD().with("action","select_prev"));
}
break;
}
@@ -539,7 +539,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
if ( !selectNextItemPair(false, reset_selection) && reset_selection)
{
// If case we are in accordion tab notify parent to go to the next accordion
- notifyParent(LLSD().insert("action","select_next"));
+ notifyParent(LLSD().with("action","select_next"));
}
break;
}
@@ -570,7 +570,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
// In case we are in accordion tab notify parent to show selected rectangle
LLRect screen_rc;
localRectToScreen(selected_rc, &screen_rc);
- notifyParent(LLSD().insert("scrollToShowRect",screen_rc.getValue()));
+ notifyParent(LLSD().with("scrollToShowRect",screen_rc.getValue()));
handled = TRUE;
}