MGR: use wxBitmapComboBox insert() and append() calls without client data argument

svn path=/trunk/boinc/; revision=24613
This commit is contained in:
Charlie Fenton 2011-11-16 14:37:49 +00:00
parent 407599604e
commit db635dde5e
1 changed files with 4 additions and 0 deletions

View File

@ -99,6 +99,8 @@ int CBOINCBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, u
void CBOINCBitmapComboBox::Delete(unsigned int n) {
if (n < GetCount()) {
// Caller must have already deleted the data and set the pointer to NULL
wxASSERT(!m_pClientData[n]);
std::vector<void*>::iterator deletionPoint = m_pClientData.begin();
m_pClientData.erase(deletionPoint + n);
}
@ -111,6 +113,8 @@ void CBOINCBitmapComboBox::Delete(unsigned int n) {
void CBOINCBitmapComboBox::Clear() {
int count = GetCount();
for(int j = count-1; j >=0; --j) {
// Caller must have already deleted the data and set the pointer to NULL
wxASSERT(!m_pClientData[j]);
m_pClientData[j] = NULL;
}
m_pClientData.clear();