diff options
author | Kent Quirk <q@lindenlab.com> | 2009-12-01 20:59:08 -0500 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2009-12-01 20:59:08 -0500 |
commit | f496c2b164a100836d74909c3e27adcdf98018f0 (patch) | |
tree | 25815a00164d3711e496e6bf751bdc947d0e41fd /indra/newview | |
parent | 2f0b1d164a939d73aae099c9a3a7eaf76f504eaa (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/newview')
-rw-r--r-- | indra/newview/llavatarlistitem.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llchathistory.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lleventnotifier.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterabout.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloatertestinspectors.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llgroupactions.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llgrouplist.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanelblockedlist.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lluilistener.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llworldmapview.cpp | 6 |
17 files changed, 28 insertions, 28 deletions
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index efc9538fa6..3bee5c353f 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -260,7 +260,7 @@ void LLAvatarListItem::setAvatarIconVisible(bool visible) void LLAvatarListItem::onInfoBtnClick() { - LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarId)); + LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarId)); /* TODO fix positioning of inspector localPointToScreen(mXPos, mYPos, &mXPos, &mYPos); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 078c2518c6..6e1bb961a5 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -78,7 +78,7 @@ public: { LLMuteList::getInstance()->add(LLMute(getAvatarId(), mFrom, LLMute::OBJECT)); - LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().insert("blocked_to_select", getAvatarId())); + LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().with("blocked_to_select", getAvatarId())); } } @@ -160,11 +160,11 @@ public: { if (mSourceType == CHAT_SOURCE_OBJECT) { - LLFloaterReg::showInstance("inspect_object", LLSD().insert("object_id", mAvatarID)); + LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", mAvatarID)); } else if (mSourceType == CHAT_SOURCE_AGENT) { - LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarID)); + LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarID)); } //if chat source is system, you may add "else" here to define behaviour. } diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp index 9c8af16535..b64799bd86 100644 --- a/indra/newview/lleventnotifier.cpp +++ b/indra/newview/lleventnotifier.cpp @@ -197,7 +197,7 @@ bool LLEventNotification::handleResponse(const LLSD& notification, const LLSD& r break; } case 1: - LLFloaterReg::showInstance("search", LLSD().insert("category", "events").insert("id", S32(getEventID()))); + LLFloaterReg::showInstance("search", LLSD().with("category", "events").with("id", S32(getEventID()))); break; case 2: break; diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 58c0c19761..68fc69b4f7 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -312,7 +312,7 @@ public: add("getInfo", "Request an LLSD::Map containing information used to populate About box", &LLFloaterAboutListener::getInfo, - LLSD().insert("reply", LLSD())); + LLSD().with("reply", LLSD())); } private: diff --git a/indra/newview/llfloatertestinspectors.cpp b/indra/newview/llfloatertestinspectors.cpp index 09996b0b92..58d5197eaa 100644 --- a/indra/newview/llfloatertestinspectors.cpp +++ b/indra/newview/llfloatertestinspectors.cpp @@ -82,12 +82,12 @@ void LLFloaterTestInspectors::showAvatarInspector(LLUICtrl*, const LLSD& avatar_ id = avatar_id.asUUID(); } // spawns off mouse position automatically - LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", id)); + LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", id)); } void LLFloaterTestInspectors::showObjectInspector(LLUICtrl*, const LLSD& object_id) { - LLFloaterReg::showInstance("inspect_object", LLSD().insert("object_id", object_id)); + LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", object_id)); } void LLFloaterTestInspectors::onClickAvatar2D() diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 6fe8ed0e4d..4adefdfcaf 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -113,7 +113,7 @@ LLGroupHandler gGroupHandler; // static void LLGroupActions::search() { - LLFloaterReg::showInstance("search", LLSD().insert("category", "groups")); + LLFloaterReg::showInstance("search", LLSD().with("category", "groups")); } // static diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index cdb85f5b1c..97cf139f1d 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -329,7 +329,7 @@ void LLGroupListItem::setActive(bool active) void LLGroupListItem::onInfoBtnClick() { - LLFloaterReg::showInstance("inspect_group", LLSD().insert("group_id", mGroupID)); + LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", mGroupID)); } void LLGroupListItem::onProfileBtnClick() diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 9d4dc2b285..d97f1d4d18 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -473,7 +473,7 @@ void LLLocationInputCtrl::draw() void LLLocationInputCtrl::onInfoButtonClicked() { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "agent")); + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent")); } void LLLocationInputCtrl::onForSaleButtonClicked() @@ -495,7 +495,7 @@ void LLLocationInputCtrl::onAddLandmarkButtonClicked() } else { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); } } @@ -844,12 +844,12 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata) if(!landmark) { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); } else { LLSideTray::getInstance()->showPanel("panel_places", - LLSD().insert("type", "landmark").insert("id",landmark->getUUID())); + LLSD().with("type", "landmark").with("id",landmark->getUUID())); } } else if (item == "cut") diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 41376c4c09..e65b7d8a0c 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -561,7 +561,7 @@ void LLNavigationBar::handleLoginComplete() void LLNavigationBar::invokeSearch(std::string search_text) { - LLFloaterReg::showInstance("search", LLSD().insert("category", "all").insert("id", LLSD(search_text))); + LLFloaterReg::showInstance("search", LLSD().with("category", "all").with("id", LLSD(search_text))); } void LLNavigationBar::clearHistoryCache() diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index 73cffaa7ed..ae703ebd8e 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -104,7 +104,7 @@ void LLPanelBlockedList::selectBlocked(const LLUUID& mute_id) void LLPanelBlockedList::showPanelAndSelect(const LLUUID& idToSelect) { - LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().insert(BLOCKED_PARAM_NAME, idToSelect)); + LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().with(BLOCKED_PARAM_NAME, idToSelect)); } diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 413d8ed756..3af18bb751 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -596,11 +596,11 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const if(landmark) { LLSideTray::getInstance()->showPanel("panel_places", - LLSD().insert("type", "landmark").insert("id",landmark->getUUID())); + LLSD().with("type", "landmark").with("id",landmark->getUUID())); } else { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); } } else if ("category" == command_name) diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 6771bb4170..1743df52fc 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1298,7 +1298,7 @@ void LLPanelPeople::notifyChildren(const LLSD& info) if (container->getCurrentPanelIndex() > 0) { // if not on the default panel, switch to it - container->onOpen(LLSD().insert(LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME, getName())); + container->onOpen(LLSD().with(LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME, getName())); } else LLSideTray::getInstance()->collapseSideBar(); diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 4d152a13f3..1830d00f68 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -68,7 +68,7 @@ public: if (verb == "inspect") { - LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", avatar_id)); + LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", avatar_id)); return true; } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index db8bda008e..50c20bc98f 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -482,7 +482,7 @@ bool idle_startup() { std::string diagnostic = "Could not start address resolution system"; LL_WARNS("AppInit") << diagnostic << LL_ENDL; - LLAppViewer::instance()->earlyExit("LoginFailedNoNetwork", LLSD().insert("DIAGNOSTIC", diagnostic)); + LLAppViewer::instance()->earlyExit("LoginFailedNoNetwork", LLSD().with("DIAGNOSTIC", diagnostic)); } // @@ -553,7 +553,7 @@ bool idle_startup() { std::string diagnostic = llformat(" Error: %d", gMessageSystem->getErrorCode()); LL_WARNS("AppInit") << diagnostic << LL_ENDL; - LLAppViewer::instance()->earlyExit("LoginFailedNoNetwork", LLSD().insert("DIAGNOSTIC", diagnostic)); + LLAppViewer::instance()->earlyExit("LoginFailedNoNetwork", LLSD().with("DIAGNOSTIC", diagnostic)); } #if LL_WINDOWS @@ -576,7 +576,7 @@ bool idle_startup() } else { - LLAppViewer::instance()->earlyExit("MessageTemplateNotFound", LLSD().insert("PATH", message_template_path)); + LLAppViewer::instance()->earlyExit("MessageTemplateNotFound", LLSD().with("PATH", message_template_path)); } if(gMessageSystem && gMessageSystem->isOK()) diff --git a/indra/newview/lluilistener.cpp b/indra/newview/lluilistener.cpp index 8b4cfa7248..3ad9887bec 100644 --- a/indra/newview/lluilistener.cpp +++ b/indra/newview/lluilistener.cpp @@ -29,7 +29,7 @@ LLUIListener::LLUIListener(): "Invoke the operation named by [\"function\"], passing [\"parameter\"],\n" "as if from a user gesture on a menu -- or a button click.", &LLUIListener::call, - LLSD().insert("function", LLSD())); + LLSD().with("function", LLSD())); } void LLUIListener::call(const LLSD& event) const diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 34d07f3284..0b40492391 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5360,7 +5360,7 @@ class LLWorldCreateLandmark : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); return true; } diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 60b1e59645..e6857ea780 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1728,20 +1728,20 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask ) id.toString(uuid_str); uuid_str = uuid_str.substr(28); sscanf(uuid_str.c_str(), "%X", &event_id); - LLFloaterReg::showInstance("search", LLSD().insert("category", "events").insert("id", event_id)); + LLFloaterReg::showInstance("search", LLSD().with("category", "events").with("id", event_id)); break; } case MAP_ITEM_LAND_FOR_SALE: case MAP_ITEM_LAND_FOR_SALE_ADULT: { LLFloaterReg::hideInstance("world_map"); - LLFloaterReg::showInstance("search", LLSD().insert("category", "destinations").insert("id", id)); + LLFloaterReg::showInstance("search", LLSD().with("category", "destinations").with("id", id)); break; } case MAP_ITEM_CLASSIFIED: { LLFloaterReg::hideInstance("world_map"); - LLFloaterReg::showInstance("search", LLSD().insert("category", "classifieds").insert("id", id)); + LLFloaterReg::showInstance("search", LLSD().with("category", "classifieds").with("id", id)); break; } default: |