summaryrefslogtreecommitdiff
path: root/indra/newview/llcofwearables.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-06-17 10:53:10 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-06-17 10:53:10 +0100
commitacfb50f61c04b12c8df4420c943b6cc9242eb7e9 (patch)
tree801682aaa0cca47de6dc2978db71422476ca39fc /indra/newview/llcofwearables.cpp
parent599a9a97b42626f2e45d4a9bf8e2dc297b3c31b1 (diff)
parent9eeaaf67387377fcf552be7cae5191df338f5a1e (diff)
merge from PE's viewer-release
Diffstat (limited to 'indra/newview/llcofwearables.cpp')
-rw-r--r--indra/newview/llcofwearables.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 880d79222b..46d2e0a5db 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -576,7 +576,9 @@ void LLCOFWearables::clear()
LLAssetType::EType LLCOFWearables::getExpandedAccordionAssetType()
{
- static std::map<std::string, LLAssetType::EType> type_map;
+ typedef std::map<std::string, LLAssetType::EType> type_map_t;
+
+ static type_map_t type_map;
static LLAccordionCtrl* accordion_ctrl = getChild<LLAccordionCtrl>("cof_wearables_accordion");
if (type_map.empty())
@@ -587,14 +589,16 @@ LLAssetType::EType LLCOFWearables::getExpandedAccordionAssetType()
}
const LLAccordionCtrlTab* tab = accordion_ctrl->getExpandedTab();
+ LLAssetType::EType result = LLAssetType::AT_NONE;
- if (!tab)
+ if (tab)
{
- llwarns << "No accordion is expanded" << llendl;
- return LLAssetType::AT_NONE;
+ type_map_t::iterator i = type_map.find(tab->getName());
+ llassert(i != type_map.end());
+ result = i->second;
}
- return type_map[tab->getName()];
+ return result;
}
void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContextMenu* menu)