mirror of https://github.com/BOINC/boinc.git
MGR: use wxBitmapComboBox insert() and append() calls without client data argument
svn path=/trunk/boinc/; revision=24613
This commit is contained in:
parent
407599604e
commit
db635dde5e
|
@ -99,6 +99,8 @@ int CBOINCBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, u
|
||||||
|
|
||||||
void CBOINCBitmapComboBox::Delete(unsigned int n) {
|
void CBOINCBitmapComboBox::Delete(unsigned int n) {
|
||||||
if (n < GetCount()) {
|
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();
|
std::vector<void*>::iterator deletionPoint = m_pClientData.begin();
|
||||||
m_pClientData.erase(deletionPoint + n);
|
m_pClientData.erase(deletionPoint + n);
|
||||||
}
|
}
|
||||||
|
@ -111,6 +113,8 @@ void CBOINCBitmapComboBox::Delete(unsigned int n) {
|
||||||
void CBOINCBitmapComboBox::Clear() {
|
void CBOINCBitmapComboBox::Clear() {
|
||||||
int count = GetCount();
|
int count = GetCount();
|
||||||
for(int j = count-1; j >=0; --j) {
|
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[j] = NULL;
|
||||||
}
|
}
|
||||||
m_pClientData.clear();
|
m_pClientData.clear();
|
||||||
|
|
Loading…
Reference in New Issue