// Delete all entries
void Clear();
- size_t GetCount() const
- {
- return m_items.size();
- }
+ size_t GetCount() const { return m_items.size(); }
wxPGChoiceEntry* Item( unsigned int i ) const
{
+ wxCHECK_MSG( i < GetCount(), NULL, "invalid index" );
+
return (wxPGChoiceEntry*) m_items[i];
}
const wxString& GetLabel( size_t ind ) const
{
- wxASSERT( ind >= 0 && ind < GetCount() );
return Item(ind).GetText();
}
bool HasValues() const;
bool HasValue( unsigned int i ) const
- { return (m_data->GetCount() > i && m_data->Item(i)->HasValue()); }
+ { return (i < m_data->GetCount()) && m_data->Item(i)->HasValue(); }
int Index( const wxString& str ) const;
int Index( int val ) const;