Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

GUIDialogSelect: get rid of not needed m_vecListInternal and just use…

… m_vecList (we don't store pointer to external list anymore)
  • Loading branch information...
commit 6d1aeacd0a882fad5d9a6752e0c113b521e8c9fc 1 parent 7c936f1
@pieh pieh authored
Showing with 8 additions and 14 deletions.
  1. +8 −13 xbmc/dialogs/GUIDialogSelect.cpp
  2. +0 −1  xbmc/dialogs/GUIDialogSelect.h
View
21 xbmc/dialogs/GUIDialogSelect.cpp
@@ -35,17 +35,16 @@ CGUIDialogSelect::CGUIDialogSelect(void)
m_bButtonEnabled = false;
m_buttonString = -1;
m_useDetails = false;
- m_vecListInternal = new CFileItemList;
+ m_vecList = new CFileItemList;
m_selectedItems = new CFileItemList;
m_multiSelection = false;
- m_vecList = m_vecListInternal;
m_iSelected = -1;
m_loadType = KEEP_IN_MEMORY;
}
CGUIDialogSelect::~CGUIDialogSelect(void)
{
- delete m_vecListInternal;
+ delete m_vecList;
delete m_selectedItems;
}
@@ -76,8 +75,7 @@ bool CGUIDialogSelect::OnMessage(CGUIMessage& message)
}
}
- m_vecListInternal->Clear();
- m_vecList = m_vecListInternal;
+ m_vecList->Clear();
m_buttonString = -1;
SET_CONTROL_LABEL(CONTROL_BUTTON, "");
@@ -158,15 +156,14 @@ void CGUIDialogSelect::Reset()
m_useDetails = false;
m_multiSelection = false;
m_iSelected = -1;
- m_vecListInternal->Clear();
+ m_vecList->Clear();
m_selectedItems->Clear();
- m_vecList = m_vecListInternal;
}
void CGUIDialogSelect::Add(const CStdString& strLabel)
{
CFileItemPtr pItem(new CFileItem(strLabel));
- m_vecListInternal->Add(pItem);
+ m_vecList->Add(pItem);
}
void CGUIDialogSelect::Add(const CFileItemList& items)
@@ -181,17 +178,15 @@ void CGUIDialogSelect::Add(const CFileItemList& items)
void CGUIDialogSelect::Add(const CFileItem* pItem)
{
CFileItemPtr item(new CFileItem(*pItem));
- m_vecListInternal->Add(item);
+ m_vecList->Add(item);
}
void CGUIDialogSelect::SetItems(CFileItemList* pList)
{
// need to make internal copy of list to be sure dialog is owner of it
- m_vecListInternal->Clear();
+ m_vecList->Clear();
if (pList)
- m_vecListInternal->Copy(*pList);
-
- m_vecList = m_vecListInternal;
+ m_vecList->Copy(*pList);
}
int CGUIDialogSelect::GetSelectedLabel() const
View
1  xbmc/dialogs/GUIDialogSelect.h
@@ -69,7 +69,6 @@ class CGUIDialogSelect :
bool m_multiSelection;
CFileItemList* m_selectedItems;
- CFileItemList* m_vecListInternal;
CFileItemList* m_vecList;
CGUIViewControl m_viewControl;
};
Please sign in to comment.
Something went wrong with that request. Please try again.