summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2009-11-12 16:03:59 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2009-11-12 16:03:59 -0500
commit315af3fb82574698078dce00236e2778d6ce9730 (patch)
treedcc59e6db7d43fb845baef97342f5f14b1d84ed1 /indra/newview/llappearancemgr.cpp
parent0b104e2a418dc794ce7230ab30f472d1787cd9c4 (diff)
LLAppearanceManager cleanup - no static at all
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp57
1 files changed, 29 insertions, 28 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 5f2d22d78c..9301a47e6e 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -361,6 +361,31 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLIn
dst = new_dst;
}
+static void onWearableAssetFetch(LLWearable* wearable, void* data)
+{
+ LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data;
+ bool append = holder->append;
+
+ if(wearable)
+ {
+ for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin();
+ iter != holder->mFoundList.end(); ++iter)
+ {
+ LLFoundData* data = *iter;
+ if(wearable->getAssetID() == data->mAssetID)
+ {
+ data->mWearable = wearable;
+ break;
+ }
+ }
+ }
+ holder->mResolved += 1;
+ if(holder->mResolved >= (S32)holder->mFoundList.size())
+ {
+ LLAppearanceManager::instance().updateAgentWearables(holder, append);
+ }
+}
+
LLUUID LLAppearanceManager::getCOF()
{
return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
@@ -760,32 +785,6 @@ void LLAppearanceManager::rebuildCOFFromOutfit(const LLUUID& category)
}
}
-/* static */
-void LLAppearanceManager::onWearableAssetFetch(LLWearable* wearable, void* data)
-{
- LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data;
- bool append = holder->append;
-
- if(wearable)
- {
- for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin();
- iter != holder->mFoundList.end(); ++iter)
- {
- LLFoundData* data = *iter;
- if(wearable->getAssetID() == data->mAssetID)
- {
- data->mWearable = wearable;
- break;
- }
- }
- }
- holder->mResolved += 1;
- if(holder->mResolved >= (S32)holder->mFoundList.size())
- {
- LLAppearanceManager::instance().updateAgentWearables(holder, append);
- }
-}
-
void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, bool append)
{
lldebugs << "updateAgentWearables()" << llendl;
@@ -893,7 +892,7 @@ void LLAppearanceManager::updateAppearanceFromCOF()
LLWearableList::instance().getAsset(found->mAssetID,
found->mName,
found->mAssetType,
- LLAppearanceManager::onWearableAssetFetch,
+ onWearableAssetFetch,
(void*)holder);
}
}
@@ -1009,7 +1008,9 @@ void LLAppearanceManager::wearInventoryCategoryOnAvatar( LLInventoryCategory* ca
if( gFloaterCustomize )
{
- gFloaterCustomize->askToSaveIfDirty(boost::bind(LLAppearanceManager::changeOutfit, _1, category->getUUID(), append));
+ gFloaterCustomize->askToSaveIfDirty(boost::bind(&LLAppearanceManager::changeOutfit,
+ &LLAppearanceManager::instance(),
+ _1, category->getUUID(), append));
}
else
{