STL fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2004-02-29 15:15:59 +00:00
parent 08938fe1b5
commit 9c592b6165
4 changed files with 17 additions and 17 deletions

View File

@@ -292,13 +292,13 @@ bool wxAnimationPlayer::PlayFrame()
// Clear the wxImage cache // Clear the wxImage cache
void wxAnimationPlayer::ClearCache() void wxAnimationPlayer::ClearCache()
{ {
wxNode* node = m_frames.GetFirst(); wxList::compatibility_iterator node = m_frames.GetFirst();
while (node) while (node)
{ {
wxNode* next = node->GetNext(); wxList::compatibility_iterator next = node->GetNext();
wxBitmap* bitmap = (wxBitmap*) node->GetData(); wxBitmap* bitmap = (wxBitmap*) node->GetData();
delete bitmap; delete bitmap;
delete node; m_frames.Erase(node);
node = next; node = next;
} }
} }
@@ -369,7 +369,7 @@ void wxAnimationPlayer::DrawFrame(int frame, wxDC& dc, const wxPoint& pos)
{ {
wxASSERT_MSG( (m_animation != NULL), _T("Animation not present in wxAnimationPlayer")); wxASSERT_MSG( (m_animation != NULL), _T("Animation not present in wxAnimationPlayer"));
wxASSERT_MSG( (m_frames.GetCount() != 0), _T("Animation cache not present in wxAnimationPlayer")); wxASSERT_MSG( (m_frames.GetCount() != 0), _T("Animation cache not present in wxAnimationPlayer"));
wxASSERT_MSG( (m_frames.Item(frame) != (wxNode*) NULL), _T("Image not present in wxAnimationPlayer::DrawFrame")); wxASSERT_MSG( !!m_frames.Item(frame), _T("Image not present in wxAnimationPlayer::DrawFrame"));
wxBitmap* bitmap = (wxBitmap*) m_frames.Item(frame)->GetData() ; wxBitmap* bitmap = (wxBitmap*) m_frames.Item(frame)->GetData() ;

View File

@@ -186,7 +186,7 @@ wxMultiCellSizer::wxMultiCellSizer( int rows, int cols)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
wxMultiCellSizer::~wxMultiCellSizer() wxMultiCellSizer::~wxMultiCellSizer()
{ {
m_children.DeleteContents(TRUE); WX_CLEAR_LIST(wxSizerItemList, m_children);
free(m_maxHeight); free(m_maxHeight);
free(m_maxWidth); free(m_maxWidth);
@@ -296,8 +296,8 @@ void wxMultiCellSizer::RecalcSizes()
wxPoint c_point; wxPoint c_point;
wxSize c_size; wxSize c_size;
wxSizerItemList::Node *current = m_children.GetFirst(); wxSizerItemList::compatibility_iterator current = m_children.GetFirst();
while (current != NULL) while (current)
{ {
wxSizerItem *item = current->GetData(); wxSizerItem *item = current->GetData();
@@ -400,7 +400,7 @@ void wxMultiCellSizer :: GetMinimums()
m_weights[x]->SetWidth(0); m_weights[x]->SetWidth(0);
} }
wxSizerItemList::Node *node = m_children.GetFirst(); wxSizerItemList::compatibility_iterator node = m_children.GetFirst();
while (node) while (node)
{ {
wxSizerItem *item = node->GetData(); wxSizerItem *item = node->GetData();

View File

@@ -717,7 +717,7 @@ void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event)
} }
// Find targets in splitter window and send the event to them // Find targets in splitter window and send the event to them
wxWindowListNode* node = GetChildren().GetFirst(); wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
while (node) while (node)
{ {
wxWindow* child = (wxWindow*) node->GetData(); wxWindow* child = (wxWindow*) node->GetData();

View File

@@ -229,7 +229,7 @@ void wxPlotArea::OnMouse( wxMouseEvent &event )
x += view_x; x += view_x;
y += view_y; y += view_y;
wxNode *node = m_owner->m_curves.GetFirst(); wxList::compatibility_iterator node = m_owner->m_curves.GetFirst();
while (node) while (node)
{ {
wxPlotCurve *curve = (wxPlotCurve*)node->GetData(); wxPlotCurve *curve = (wxPlotCurve*)node->GetData();
@@ -413,7 +413,7 @@ void wxPlotArea::OnPaint( wxPaintEvent &WXUNUSED(event) )
} }
*/ */
wxNode *node = m_owner->m_curves.GetFirst(); wxList::compatibility_iterator node = m_owner->m_curves.GetFirst();
while (node) while (node)
{ {
wxPlotCurve *curve = (wxPlotCurve*) node->GetData(); wxPlotCurve *curve = (wxPlotCurve*) node->GetData();
@@ -810,7 +810,7 @@ size_t wxPlotWindow::GetCount()
wxPlotCurve *wxPlotWindow::GetAt( size_t n ) wxPlotCurve *wxPlotWindow::GetAt( size_t n )
{ {
wxNode *node = m_curves.Item( n ); wxList::compatibility_iterator node = m_curves.Item( n );
if (!node) if (!node)
return (wxPlotCurve*) NULL; return (wxPlotCurve*) NULL;
@@ -833,7 +833,7 @@ void wxPlotWindow::SetCurrent( wxPlotCurve* current )
void wxPlotWindow::Delete( wxPlotCurve* curve ) void wxPlotWindow::Delete( wxPlotCurve* curve )
{ {
wxNode *node = m_curves.Find( curve ); wxList::compatibility_iterator node = m_curves.Find( curve );
if (!node) return; if (!node) return;
m_curves.DeleteObject( curve ); m_curves.DeleteObject( curve );
@@ -856,7 +856,7 @@ void wxPlotWindow::Add( wxPlotOnOffCurve *curve )
void wxPlotWindow::Delete( wxPlotOnOffCurve* curve ) void wxPlotWindow::Delete( wxPlotOnOffCurve* curve )
{ {
wxNode *node = m_onOffCurves.Find( curve ); wxList::compatibility_iterator node = m_onOffCurves.Find( curve );
if (!node) return; if (!node) return;
m_onOffCurves.DeleteObject( curve ); m_onOffCurves.DeleteObject( curve );
@@ -869,7 +869,7 @@ size_t wxPlotWindow::GetOnOffCurveCount()
wxPlotOnOffCurve *wxPlotWindow::GetOnOffCurveAt( size_t n ) wxPlotOnOffCurve *wxPlotWindow::GetOnOffCurveAt( size_t n )
{ {
wxNode *node = m_onOffCurves.Item( n ); wxList::compatibility_iterator node = m_onOffCurves.Item( n );
if (!node) if (!node)
return (wxPlotOnOffCurve*) NULL; return (wxPlotOnOffCurve*) NULL;
@@ -950,7 +950,7 @@ void wxPlotWindow::SetZoom( double zoom )
GetViewStart( &view_x, &view_y ); GetViewStart( &view_x, &view_y );
wxInt32 max = 0; wxInt32 max = 0;
wxNode *node = m_curves.GetFirst(); wxList::compatibility_iterator node = m_curves.GetFirst();
while (node) while (node)
{ {
wxPlotCurve *curve = (wxPlotCurve*) node->GetData(); wxPlotCurve *curve = (wxPlotCurve*) node->GetData();
@@ -970,7 +970,7 @@ void wxPlotWindow::SetZoom( double zoom )
void wxPlotWindow::ResetScrollbar() void wxPlotWindow::ResetScrollbar()
{ {
wxInt32 max = 0; wxInt32 max = 0;
wxNode *node = m_curves.GetFirst(); wxList::compatibility_iterator node = m_curves.GetFirst();
while (node) while (node)
{ {
wxPlotCurve *curve = (wxPlotCurve*) node->GetData(); wxPlotCurve *curve = (wxPlotCurve*) node->GetData();