summaryrefslogtreecommitdiff
path: root/indra/newview/llagentwearables.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-12-10 14:47:17 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-12-10 14:47:17 -0500
commit0777f53e2f2d773fa536b3c62e16455ce7bbbcce (patch)
tree2050b2eb704687a839dfa42a0cd6b62c16e8cae8 /indra/newview/llagentwearables.cpp
parent542a9e0a410cc760f871082bf92cbea06c5a03ad (diff)
SH-3606 WIP - replaced several LLInventoryCallback subclasses with boost::func equivalents
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rwxr-xr-xindra/newview/llagentwearables.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index e2304e6db9..e79fda2459 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -61,19 +61,16 @@ using namespace LLAvatarAppearanceDefines;
///////////////////////////////////////////////////////////////////////////////
// Callback to wear and start editing an item that has just been created.
-class LLWearAndEditCallback : public LLInventoryCallback
+void wear_and_edit_cb(const LLUUID& inv_item)
{
- void fire(const LLUUID& inv_item)
- {
- if (inv_item.isNull()) return;
-
- // Request editing the item after it gets worn.
- gAgentWearables.requestEditingWearable(inv_item);
-
- // Wear it.
- LLAppearanceMgr::instance().wearItemOnAvatar(inv_item);
- }
-};
+ if (inv_item.isNull()) return;
+
+ // Request editing the item after it gets worn.
+ gAgentWearables.requestEditingWearable(inv_item);
+
+ // Wear it.
+ LLAppearanceMgr::instance().wearItemOnAvatar(inv_item);
+}
///////////////////////////////////////////////////////////////////////////////
@@ -965,8 +962,8 @@ public:
llinfos << "All items created" << llendl;
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
LLAppearanceMgr::instance().linkAll(LLAppearanceMgr::instance().getCOF(),
- mItemsToLink,
- link_waiter);
+ mItemsToLink,
+ link_waiter);
}
void addPendingWearable(LLViewerWearable *wearable)
{
@@ -1789,7 +1786,7 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con
LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
LLAssetType::EType asset_type = wearable->getAssetType();
LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE;
- LLPointer<LLInventoryCallback> cb = wear ? new LLWearAndEditCallback : NULL;
+ LLPointer<LLInventoryCallback> cb = wear ? new LLBoostFuncInventoryCallback(wear_and_edit_cb) : NULL;
LLUUID folder_id;
if (parent_id.notNull())