STL-ification patch for wxMSW and wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -156,7 +156,7 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid choice control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_RET( node, wxT("invalid index in wxChoice::DoSetItemClientData") );
|
||||
|
||||
node->SetData( (wxObject*) clientData );
|
||||
@@ -166,7 +166,7 @@ void* wxChoice::DoGetItemClientData( int n ) const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid choice control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_MSG( node, NULL, wxT("invalid index in wxChoice::DoGetItemClientData") );
|
||||
|
||||
return node->GetData();
|
||||
@@ -176,7 +176,7 @@ void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid choice control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_RET( node, wxT("invalid index in wxChoice::DoSetItemClientObject") );
|
||||
|
||||
// wxItemContainer already deletes data for us
|
||||
@@ -188,7 +188,7 @@ wxClientData* wxChoice::DoGetItemClientObject( int n ) const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, (wxClientData*) NULL, wxT("invalid choice control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_MSG( node, (wxClientData *)NULL,
|
||||
wxT("invalid index in wxChoice::DoGetItemClientObject") );
|
||||
|
||||
@@ -208,7 +208,7 @@ void wxChoice::Clear()
|
||||
// destroy the data (due to Robert's idea of using wxList<wxObject>
|
||||
// and not wxList<wxClientData> we can't just say
|
||||
// m_clientList.DeleteContents(TRUE) - this would crash!
|
||||
wxNode *node = m_clientList.GetFirst();
|
||||
wxList::compatibility_iterator node = m_clientList.GetFirst();
|
||||
while ( node )
|
||||
{
|
||||
delete (wxClientData *)node->GetData();
|
||||
|
Reference in New Issue
Block a user