// declarations
// ============================================================================
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "dcbase.h"
#endif
wxPoint *points = new wxPoint[n];
int i = 0;
- for ( wxNode *node = list->GetFirst(); node; node = node->GetNext(), i++ )
+ for ( wxList::compatibility_iterator node = list->GetFirst(); node; node = node->GetNext(), i++ )
{
wxPoint *point = (wxPoint *)node->GetData();
points[i].x = point->x;
wxPoint *points = new wxPoint[n];
int i = 0;
- for ( wxNode *node = list->GetFirst(); node; node = node->GetNext(), i++ )
+ for ( wxList::compatibility_iterator node = list->GetFirst(); node; node = node->GetNext(), i++ )
{
wxPoint *point = (wxPoint *)node->GetData();
points[i].x = point->x;
DrawSpline(&point_list);
- for( wxNode *node = point_list.GetFirst(); node; node = node->GetNext() )
+ for( wxList::compatibility_iterator node = point_list.GetFirst(); node; node = node->GetNext() )
{
wxPoint *p = (wxPoint *)node->GetData();
delete p;
static void wx_spline_draw_point_array(wxDCBase *dc)
{
dc->DrawLines(&wx_spline_point_list, 0, 0 );
- wxNode *node = wx_spline_point_list.GetFirst();
+ wxList::compatibility_iterator node = wx_spline_point_list.GetFirst();
while (node)
{
wxPoint *point = (wxPoint *)node->GetData();
delete point;
- delete node;
+ wx_spline_point_list.Erase(node);
node = wx_spline_point_list.GetFirst();
}
}
double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4;
double x1, y1, x2, y2;
- wxNode *node = points->GetFirst();
+ wxList::compatibility_iterator node = points->GetFirst();
p = (wxPoint *)node->GetData();
x1 = p->x;
wx_spline_add_point(x1, y1);
- while ((node = node->GetNext()) != NULL)
+ while ((node = node->GetNext())
+#if !wxUSE_STL
+ != NULL
+#endif // !wxUSE_STL
+ )
{
p = (wxPoint *)node->GetData();
x1 = x2;