summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolview.cpp')
-rw-r--r--indra/newview/lltoolview.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/lltoolview.cpp b/indra/newview/lltoolview.cpp
index 93729a5b91..ad7a980091 100644
--- a/indra/newview/lltoolview.cpp
+++ b/indra/newview/lltoolview.cpp
@@ -72,7 +72,8 @@ LLToolView::LLToolView(const std::string& name, const LLRect& rect)
LLToolView::~LLToolView()
{
- mContainList.deleteAllData();
+ for_each(mContainList.begin(), mContainList.end(), DeletePointer());
+ mContainList.clear();
}
//*TODO:translate?
@@ -118,7 +119,7 @@ void LLToolView::addTool(const LLString& icon_off, const LLString& icon_on, LLPa
addChild(contain->mPanel);
}
- mContainList.addData(contain);
+ mContainList.push_back(contain);
}
@@ -153,11 +154,10 @@ void LLToolView::draw()
// turn off highlighting for all containers
// and hide all option panels except for the selected one.
LLTool* selected = gToolMgr->getCurrentToolset()->getSelectedTool();
- for( LLToolContainer* contain = mContainList.getFirstData();
- contain != NULL;
- contain = mContainList.getNextData()
- )
+ for (contain_list_t::iterator iter = mContainList.begin();
+ iter != mContainList.end(); ++iter)
{
+ LLToolContainer* contain = *iter;
BOOL state = (contain->mTool == selected);
contain->mButton->setToggleState( state );
if (contain->mPanel)
@@ -175,8 +175,10 @@ LLToolContainer* LLToolView::findToolContainer( LLTool *tool )
{
// Find the container for this tool
llassert( tool );
- for( LLToolContainer* contain = mContainList.getFirstData(); contain; contain = mContainList.getNextData() )
+ for (contain_list_t::iterator iter = mContainList.begin();
+ iter != mContainList.end(); ++iter)
{
+ LLToolContainer* contain = *iter;
if( contain->mTool == tool )
{
return contain;