From 36ca94a260b93ca35c5d5a09edfb8e104be0d694 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 22 Jul 2004 19:07:59 +0000 Subject: [PATCH] wxUSE_STL fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/samples/ogl/ogledit/doc.cpp | 4 +- contrib/samples/ogl/ogledit/view.cpp | 4 +- contrib/samples/ogl/studio/doc.cpp | 12 +++--- contrib/samples/ogl/studio/shapes.cpp | 8 ++-- contrib/samples/ogl/studio/symbols.cpp | 6 +-- contrib/samples/ogl/studio/view.cpp | 18 ++++---- contrib/samples/svg/svgtest.cpp | 6 +-- contrib/src/deprecated/prop.cpp | 22 +++++----- contrib/src/ogl/basic2.cpp | 60 +++++++++++++------------- samples/svg/svgtest.cpp | 6 +-- 10 files changed, 73 insertions(+), 73 deletions(-) diff --git a/contrib/samples/ogl/ogledit/doc.cpp b/contrib/samples/ogl/ogledit/doc.cpp index 331d12282b..9c1f91e3b8 100644 --- a/contrib/samples/ogl/ogledit/doc.cpp +++ b/contrib/samples/ogl/ogledit/doc.cpp @@ -424,7 +424,7 @@ bool DiagramCommand::Undo(void) // Remove each individual line connected to a shape by sending a command. void DiagramCommand::RemoveLines(wxShape *shape) { - wxNode *node = shape->GetLines().GetFirst(); + wxObjectList::compatibility_iterator node = shape->GetLines().GetFirst(); while (node) { wxLineShape *line = (wxLineShape *)node->GetData(); @@ -455,7 +455,7 @@ void MyEvtHandler::OnLeftClick(double WXUNUSED(x), double WXUNUSED(y), int keys, { // Ensure no other shape is selected, to simplify Undo/Redo code bool redraw = false; - wxNode *node = GetShape()->GetCanvas()->GetDiagram()->GetShapeList()->GetFirst(); + wxObjectList::compatibility_iterator node = GetShape()->GetCanvas()->GetDiagram()->GetShapeList()->GetFirst(); while (node) { wxShape *eachShape = (wxShape *)node->GetData(); diff --git a/contrib/samples/ogl/ogledit/view.cpp b/contrib/samples/ogl/ogledit/view.cpp index 8e26ab5f6e..f3655f821c 100644 --- a/contrib/samples/ogl/ogledit/view.cpp +++ b/contrib/samples/ogl/ogledit/view.cpp @@ -127,7 +127,7 @@ void DiagramView::OnDraw(wxDC *dc) if (diagram_p->GetShapeList()) { /* wxCursor *old_cursor = NULL; */ - wxNode *current = diagram_p->GetShapeList()->GetFirst(); + wxObjectList::compatibility_iterator current = diagram_p->GetShapeList()->GetFirst(); while (current) // Loop through the entire list of shapes { @@ -177,7 +177,7 @@ wxShape *DiagramView::FindSelectedShape(void) { DiagramDocument *doc = (DiagramDocument *)GetDocument(); wxShape *theShape = NULL; - wxNode *node = doc->GetDiagram()->GetShapeList()->GetFirst(); + wxObjectList::compatibility_iterator node = doc->GetDiagram()->GetShapeList()->GetFirst(); while (node) { wxShape *eachShape = (wxShape *)node->GetData(); diff --git a/contrib/samples/ogl/studio/doc.cpp b/contrib/samples/ogl/studio/doc.cpp index 0516794afd..8a76e6b40a 100644 --- a/contrib/samples/ogl/studio/doc.cpp +++ b/contrib/samples/ogl/studio/doc.cpp @@ -120,7 +120,7 @@ csDiagramCommand::csDiagramCommand(const wxString& name, csDiagramDocument *doc, csDiagramCommand::~csDiagramCommand() { - wxNode* node = m_states.GetFirst(); + wxObjectList::compatibility_iterator node = m_states.GetFirst(); while (node) { csCommandState* state = (csCommandState*) node->GetData(); @@ -147,14 +147,14 @@ void csDiagramCommand::InsertState(csCommandState* state) // Schedule all lines connected to the states to be cut. void csDiagramCommand::RemoveLines() { - wxNode* node = m_states.GetFirst(); + wxObjectList::compatibility_iterator node = m_states.GetFirst(); while (node) { csCommandState* state = (csCommandState*) node->GetData(); wxShape* shape = state->GetShapeOnCanvas(); wxASSERT( (shape != NULL) ); - wxNode *node1 = shape->GetLines().GetFirst(); + wxObjectList::compatibility_iterator node1 = shape->GetLines().GetFirst(); while (node1) { wxLineShape *line = (wxLineShape *)node1->GetData(); @@ -172,7 +172,7 @@ void csDiagramCommand::RemoveLines() csCommandState* csDiagramCommand::FindStateByShape(wxShape* shape) { - wxNode* node = m_states.GetFirst(); + wxObjectList::compatibility_iterator node = m_states.GetFirst(); while (node) { csCommandState* state = (csCommandState*) node->GetData(); @@ -185,7 +185,7 @@ csCommandState* csDiagramCommand::FindStateByShape(wxShape* shape) bool csDiagramCommand::Do() { - wxNode* node = m_states.GetFirst(); + wxObjectList::compatibility_iterator node = m_states.GetFirst(); while (node) { csCommandState* state = (csCommandState*) node->GetData(); @@ -200,7 +200,7 @@ bool csDiagramCommand::Undo() { // Undo in reverse order, so e.g. shapes get added // back before the lines do. - wxNode* node = m_states.GetLast(); + wxObjectList::compatibility_iterator node = m_states.GetLast(); while (node) { csCommandState* state = (csCommandState*) node->GetData(); diff --git a/contrib/samples/ogl/studio/shapes.cpp b/contrib/samples/ogl/studio/shapes.cpp index da69c5b64c..2129895d30 100644 --- a/contrib/samples/ogl/studio/shapes.cpp +++ b/contrib/samples/ogl/studio/shapes.cpp @@ -301,7 +301,7 @@ void csEvtHandler::OnDragLeft(bool draw, double x, double y, int keys, int attac GetShape()->GetEventHandler()->OnDrawOutline(dc, xx, yy, w, h); // Draw bounding box for other selected shapes - wxNode* node = GetShape()->GetCanvas()->GetDiagram()->GetShapeList()->GetFirst(); + wxObjectList::compatibility_iterator node = GetShape()->GetCanvas()->GetDiagram()->GetShapeList()->GetFirst(); while (node) { wxShape* shape = (wxShape*) node->GetData(); @@ -360,7 +360,7 @@ void csEvtHandler::OnBeginDragLeft(double x, double y, int keys, int attachment) GetShape()->GetEventHandler()->OnDrawOutline(dc, xx, yy, w, h); // Draw bounding box for other selected shapes - wxNode* node = GetShape()->GetCanvas()->GetDiagram()->GetShapeList()->GetFirst(); + wxObjectList::compatibility_iterator node = GetShape()->GetCanvas()->GetDiagram()->GetShapeList()->GetFirst(); while (node) { wxShape* shape = (wxShape*) node->GetData(); @@ -415,7 +415,7 @@ void csEvtHandler::OnEndDragLeft(double x, double y, int keys, int attachment) new csCommandState(ID_CS_MOVE, newShape, GetShape())); // Move line points - wxNode* node = GetShape()->GetCanvas()->GetDiagram()->GetShapeList()->GetFirst(); + wxObjectList::compatibility_iterator node = GetShape()->GetCanvas()->GetDiagram()->GetShapeList()->GetFirst(); while (node) { wxShape* shape = (wxShape*) node->GetData(); @@ -429,7 +429,7 @@ void csEvtHandler::OnEndDragLeft(double x, double y, int keys, int attachment) { wxLineShape* newLineShape = (wxLineShape*) lineShape->CreateNewCopy(); - wxNode *node1 = newLineShape->GetLineControlPoints()->GetFirst(); + wxObjectList::compatibility_iterator node1 = newLineShape->GetLineControlPoints()->GetFirst(); while (node1) { wxRealPoint *point = (wxRealPoint *)node1->GetData(); diff --git a/contrib/samples/ogl/studio/symbols.cpp b/contrib/samples/ogl/studio/symbols.cpp index a58d34056a..204604e046 100644 --- a/contrib/samples/ogl/studio/symbols.cpp +++ b/contrib/samples/ogl/studio/symbols.cpp @@ -74,7 +74,7 @@ void csSymbolDatabase::AddSymbol(csSymbol* symbol) void csSymbolDatabase::ClearSymbols() { - wxNode* node = m_symbols.GetFirst(); + wxObjectList::compatibility_iterator node = m_symbols.GetFirst(); while (node) { csSymbol* symbol = (csSymbol*) node->GetData(); @@ -87,7 +87,7 @@ void csSymbolDatabase::ClearSymbols() csSymbol* csSymbolDatabase::FindSymbol(const wxString& name) const { - wxNode* node = m_symbols.GetFirst(); + wxObjectList::compatibility_iterator node = m_symbols.GetFirst(); while (node) { csSymbol* symbol = (csSymbol*) node->GetData(); @@ -101,7 +101,7 @@ csSymbol* csSymbolDatabase::FindSymbol(const wxString& name) const csSymbol* csSymbolDatabase::FindSymbol(int toolId) const { - wxNode* node = m_symbols.GetFirst(); + wxObjectList::compatibility_iterator node = m_symbols.GetFirst(); while (node) { csSymbol* symbol = (csSymbol*) node->GetData(); diff --git a/contrib/samples/ogl/studio/view.cpp b/contrib/samples/ogl/studio/view.cpp index fff71b629b..f15c1cfed9 100644 --- a/contrib/samples/ogl/studio/view.cpp +++ b/contrib/samples/ogl/studio/view.cpp @@ -199,7 +199,7 @@ wxShape *csDiagramView::FindFirstSelectedShape(void) { csDiagramDocument *doc = (csDiagramDocument *)GetDocument(); wxShape *theShape = NULL; - wxNode *node = doc->GetDiagram()->GetShapeList()->GetFirst(); + wxObjectList::compatibility_iterator node = doc->GetDiagram()->GetShapeList()->GetFirst(); while (node) { wxShape *eachShape = (wxShape *)node->GetData(); @@ -216,7 +216,7 @@ wxShape *csDiagramView::FindFirstSelectedShape(void) void csDiagramView::FindSelectedShapes(wxList& selections, wxClassInfo* toFind) { csDiagramDocument *doc = (csDiagramDocument *)GetDocument(); - wxNode *node = doc->GetDiagram()->GetShapeList()->GetFirst(); + wxObjectList::compatibility_iterator node = doc->GetDiagram()->GetShapeList()->GetFirst(); while (node) { wxShape *eachShape = (wxShape *)node->GetData(); @@ -331,7 +331,7 @@ void csDiagramView::DoCut(wxList& shapes) { csDiagramCommand* cmd = new csDiagramCommand(_T("Cut"), doc); - wxNode* node = shapes.GetFirst(); + wxObjectList::compatibility_iterator node = shapes.GetFirst(); while (node) { wxShape *theShape = (wxShape*) node->GetData(); @@ -363,8 +363,8 @@ void csDiagramView::DoCmd(wxList& shapes, wxList& oldShapes, int cmd, const wxSt { csDiagramCommand* command = new csDiagramCommand(op, doc); - wxNode* node = shapes.GetFirst(); - wxNode* node1 = oldShapes.GetFirst(); + wxObjectList::compatibility_iterator node = shapes.GetFirst(); + wxObjectList::compatibility_iterator node1 = oldShapes.GetFirst(); while (node && node1) { wxShape *theShape = (wxShape*) node->GetData(); @@ -410,7 +410,7 @@ void csDiagramView::OnChangeBackgroundColour(wxCommandEvent& WXUNUSED(event)) csDiagramCommand* cmd = new csDiagramCommand(_T("Change colour"), doc); - wxNode* node = selections.GetFirst(); + wxObjectList::compatibility_iterator node = selections.GetFirst(); while (node) { wxShape *theShape = (wxShape*) node->GetData(); @@ -479,7 +479,7 @@ void csDiagramView::ApplyPointSize(int pointSize) { csDiagramCommand* cmd = new csDiagramCommand(_T("Point size"), doc); - wxNode* node = selections.GetFirst(); + wxObjectList::compatibility_iterator node = selections.GetFirst(); while (node) { wxShape *theShape = (wxShape*) node->GetData(); @@ -531,7 +531,7 @@ void csDiagramView::SelectAll(bool select) wxList selections; FindSelectedShapes(selections); - wxNode* node = selections.GetFirst(); + wxObjectList::compatibility_iterator node = selections.GetFirst(); while (node) { wxShape *theShape = (wxShape*) node->GetData(); @@ -544,7 +544,7 @@ void csDiagramView::SelectAll(bool select) else { csDiagramDocument *doc = (csDiagramDocument *)GetDocument(); - wxNode *node = doc->GetDiagram()->GetShapeList()->GetFirst(); + wxObjectList::compatibility_iterator node = doc->GetDiagram()->GetShapeList()->GetFirst(); while (node) { wxShape *eachShape = (wxShape *)node->GetData(); diff --git a/contrib/samples/svg/svgtest.cpp b/contrib/samples/svg/svgtest.cpp index a20c1562d7..96ba193cf8 100644 --- a/contrib/samples/svg/svgtest.cpp +++ b/contrib/samples/svg/svgtest.cpp @@ -224,8 +224,8 @@ void MyFrame::OnClose(wxCloseEvent& event) return ; } // now try the children - wxNode * pNode = m_children.GetFirst (); - wxNode * pNext ; + wxObjectList::compatibility_iterator pNode = m_children.GetFirst (); + wxObjectList::compatibility_iterator pNext ; MyChild * pChild ; while ( pNode ) { @@ -233,7 +233,7 @@ void MyFrame::OnClose(wxCloseEvent& event) pChild = (MyChild*) pNode -> GetData (); if (pChild -> Close ()) { - delete pNode ; + m_children.Erase(pNode) ; } else { diff --git a/contrib/src/deprecated/prop.cpp b/contrib/src/deprecated/prop.cpp index 1abb44d20d..c9eca64456 100644 --- a/contrib/src/deprecated/prop.cpp +++ b/contrib/src/deprecated/prop.cpp @@ -76,7 +76,7 @@ wxPropertyValue::wxPropertyValue(const wxString& val) m_modifiedFlag = FALSE; m_type = wxPropertyValueString; - m_value.string = copystring((const wxChar *)val); + m_value.string = copystring(val.c_str()); m_clientData = NULL; m_next = NULL; m_last = NULL; @@ -165,7 +165,7 @@ wxPropertyValue::wxPropertyValue(wxList *the_list) m_last = NULL; m_value.first = NULL; - wxNode *node = the_list->GetFirst(); + wxObjectList::compatibility_iterator node = the_list->GetFirst(); while (node) { wxPropertyValue *expr = (wxPropertyValue *)node->GetData(); @@ -184,10 +184,10 @@ wxPropertyValue::wxPropertyValue(wxStringList *the_list) m_last = NULL; m_value.first = NULL; - wxStringList::Node *node = the_list->GetFirst(); + wxStringList::compatibility_iterator node = the_list->GetFirst(); while (node) { - wxChar *s = node->GetData(); + wxString s = node->GetData(); Append(new wxPropertyValue(s)); node = node->GetNext(); } @@ -945,7 +945,7 @@ wxPropertyValidator *wxPropertyView::FindPropertyValidator(wxProperty *property) if (property->GetValidator()) return property->GetValidator(); - wxNode *node = m_validatorRegistryList.GetFirst(); + wxObjectList::compatibility_iterator node = m_validatorRegistryList.GetFirst(); while (node) { wxPropertyValidatorRegistry *registry = (wxPropertyValidatorRegistry *)node->GetData(); @@ -991,7 +991,7 @@ void wxPropertySheet::AddProperty(wxProperty *property) // Get property by name wxProperty *wxPropertySheet::GetProperty(const wxString& name) const { - wxNode *node = m_properties.Find((const wxChar*) name); + wxObjectList::compatibility_iterator node = m_properties.Find((const wxChar*) name); if (!node) return NULL; else @@ -1011,12 +1011,12 @@ bool wxPropertySheet::SetProperty(const wxString& name, const wxPropertyValue& v void wxPropertySheet::RemoveProperty(const wxString& name) { - wxNode *node = m_properties.Find(name); + wxObjectList::compatibility_iterator node = m_properties.Find(name); if(node) { wxProperty *prop = (wxProperty *)node->GetData(); delete prop; - m_properties.DeleteNode(node); + m_properties.Erase(node); } } @@ -1028,11 +1028,11 @@ bool wxPropertySheet::HasProperty(const wxString& name) const // Clear all properties void wxPropertySheet::Clear(void) { - wxNode *node = m_properties.GetFirst(); + wxObjectList::compatibility_iterator node = m_properties.GetFirst(); while (node) { wxProperty *prop = (wxProperty *)node->GetData(); - wxNode *next = node->GetNext(); + wxObjectList::compatibility_iterator next = node->GetNext(); delete prop; delete node; node = next; @@ -1042,7 +1042,7 @@ void wxPropertySheet::Clear(void) // Sets/clears the modified flag for each property value void wxPropertySheet::SetAllModified(bool flag) { - wxNode *node = m_properties.GetFirst(); + wxObjectList::compatibility_iterator node = m_properties.GetFirst(); while (node) { wxProperty *prop = (wxProperty *)node->GetData(); diff --git a/contrib/src/ogl/basic2.cpp b/contrib/src/ogl/basic2.cpp index 254d5cd2ee..658d93a725 100644 --- a/contrib/src/ogl/basic2.cpp +++ b/contrib/src/ogl/basic2.cpp @@ -75,7 +75,7 @@ void wxPolygonShape::Create(wxList *the_points) // Duplicate the list of points m_points = new wxList; - wxNode *node = the_points->GetFirst(); + wxObjectList::compatibility_iterator node = the_points->GetFirst(); while (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); @@ -99,12 +99,12 @@ void wxPolygonShape::ClearPoints() { if (m_points) { - wxNode *node = m_points->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); while (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); delete point; - delete node; + m_points->Erase(node); node = m_points->GetFirst(); } delete m_points; @@ -112,12 +112,12 @@ void wxPolygonShape::ClearPoints() } if (m_originalPoints) { - wxNode *node = m_originalPoints->GetFirst(); + wxObjectList::compatibility_iterator node = m_originalPoints->GetFirst(); while (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); delete point; - delete node; + m_originalPoints->Erase(node); node = m_originalPoints->GetFirst(); } delete m_originalPoints; @@ -141,7 +141,7 @@ void wxPolygonShape::CalculateBoundingBox() double top = 10000; double bottom = -10000; - wxNode *node = m_points->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); while (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); @@ -169,7 +169,7 @@ void wxPolygonShape::CalculatePolygonCentre() double top = 10000; double bottom = -10000; - wxNode *node = m_points->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); while (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); @@ -260,7 +260,7 @@ bool wxPolygonShape::HitTest(double x, double y, int *attachment, double *distan int np = m_points->GetCount(); double *xpoints = new double[np]; double *ypoints = new double[np]; - wxNode *node = m_points->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); int i = 0; while (node) { @@ -328,8 +328,8 @@ void wxPolygonShape::SetSize(double new_width, double new_height, bool WXUNUSED( double x_proportion = (double)(fabs(new_width/m_originalWidth)); double y_proportion = (double)(fabs(new_height/m_originalHeight)); - wxNode *node = m_points->GetFirst(); - wxNode *original_node = m_originalPoints->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); + wxObjectList::compatibility_iterator original_node = m_originalPoints->GetFirst(); while (node && original_node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); @@ -352,18 +352,18 @@ void wxPolygonShape::SetSize(double new_width, double new_height, bool WXUNUSED( void wxPolygonShape::UpdateOriginalPoints() { if (!m_originalPoints) m_originalPoints = new wxList; - wxNode *original_node = m_originalPoints->GetFirst(); + wxObjectList::compatibility_iterator original_node = m_originalPoints->GetFirst(); while (original_node) { - wxNode *next_node = original_node->GetNext(); + wxObjectList::compatibility_iterator next_node = original_node->GetNext(); wxRealPoint *original_point = (wxRealPoint *)original_node->GetData(); delete original_point; - delete original_node; + m_originalPoints->Erase(original_node); original_node = next_node; } - wxNode *node = m_points->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); while (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); @@ -379,11 +379,11 @@ void wxPolygonShape::UpdateOriginalPoints() void wxPolygonShape::AddPolygonPoint(int pos) { - wxNode *node = m_points->Item(pos); + wxObjectList::compatibility_iterator node = m_points->Item(pos); if (!node) node = m_points->GetFirst(); wxRealPoint *firstPoint = (wxRealPoint *)node->GetData(); - wxNode *node2 = m_points->Item(pos + 1); + wxObjectList::compatibility_iterator node2 = m_points->Item(pos + 1); if (!node2) node2 = m_points->GetFirst(); wxRealPoint *secondPoint = (wxRealPoint *)node2->GetData(); @@ -407,12 +407,12 @@ void wxPolygonShape::AddPolygonPoint(int pos) void wxPolygonShape::DeletePolygonPoint(int pos) { - wxNode *node = m_points->Item(pos); + wxObjectList::compatibility_iterator node = m_points->Item(pos); if (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); delete point; - delete node; + m_points->Erase(node); UpdateOriginalPoints(); if (m_selected) { @@ -437,7 +437,7 @@ bool wxPolygonShape::GetPerimeterPoint(double x1, double y1, { // Look for the point we'd be connecting to. This is // a heuristic... - wxNode *node = m_points->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); while (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); @@ -463,7 +463,7 @@ bool wxPolygonShape::GetPerimeterPoint(double x1, double y1, double *xpoints = new double[n]; double *ypoints = new double[n]; - wxNode *node = m_points->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); int i = 0; while (node) { @@ -541,7 +541,7 @@ void wxPolygonShape::OnDrawOutline(wxDC& dc, double x, double y, double w, doubl // Make as many control points as there are vertices. void wxPolygonShape::MakeControlPoints() { - wxNode *node = m_points->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); while (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); @@ -555,8 +555,8 @@ void wxPolygonShape::MakeControlPoints() void wxPolygonShape::ResetControlPoints() { - wxNode *node = m_points->GetFirst(); - wxNode *controlPointNode = m_controlPoints.GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); + wxObjectList::compatibility_iterator controlPointNode = m_controlPoints.GetFirst(); while (node && controlPointNode) { wxRealPoint *point = (wxRealPoint *)node->GetData(); @@ -582,7 +582,7 @@ void wxPolygonShape::WriteAttributes(wxExpr *clause) // Make a list of lists for the coordinates wxExpr *list = new wxExpr(wxExprList); - wxNode *node = m_points->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); while (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); @@ -740,7 +740,7 @@ void wxPolygonShape::Copy(wxShape& copy) polyCopy.m_points = new wxList; polyCopy.m_originalPoints = new wxList; - wxNode *node = m_points->GetFirst(); + wxObjectList::compatibility_iterator node = m_points->GetFirst(); while (node) { wxRealPoint *point = (wxRealPoint *)node->GetData(); @@ -765,7 +765,7 @@ void wxPolygonShape::Copy(wxShape& copy) int wxPolygonShape::GetNumberOfAttachments() const { int maxN = (m_points ? (m_points->GetCount() - 1) : 0); - wxNode *node = m_attachmentPoints.GetFirst(); + wxObjectList::compatibility_iterator node = m_attachmentPoints.GetFirst(); while (node) { wxAttachmentPoint *point = (wxAttachmentPoint *)node->GetData(); @@ -798,7 +798,7 @@ bool wxPolygonShape::AttachmentIsValid(int attachment) const if ((attachment >= 0) && (attachment < (int) m_points->GetCount())) return true; - wxNode *node = m_attachmentPoints.GetFirst(); + wxObjectList::compatibility_iterator node = m_attachmentPoints.GetFirst(); while (node) { wxAttachmentPoint *point = (wxAttachmentPoint *)node->GetData(); @@ -817,7 +817,7 @@ void wxPolygonShape::Rotate(double x, double y, double theta) // Rotate attachment points double sinTheta = (double)sin(actualTheta); double cosTheta = (double)cos(actualTheta); - wxNode *node = m_attachmentPoints.GetFirst(); + wxObjectList::compatibility_iterator node = m_attachmentPoints.GetFirst(); while (node) { wxAttachmentPoint *point = (wxAttachmentPoint *)node->GetData(); @@ -1797,7 +1797,7 @@ wxShapeRegion::wxShapeRegion(wxShapeRegion& region) m_penColour = region.m_penColour; ClearText(); - wxNode *node = region.m_formattedText.GetFirst(); + wxObjectList::compatibility_iterator node = region.m_formattedText.GetFirst(); while (node) { wxShapeTextLine *line = (wxShapeTextLine *)node->GetData(); @@ -1815,7 +1815,7 @@ wxShapeRegion::~wxShapeRegion() void wxShapeRegion::ClearText() { - wxNode *node = m_formattedText.GetFirst(); + wxObjectList::compatibility_iterator node = m_formattedText.GetFirst(); while (node) { wxShapeTextLine *line = (wxShapeTextLine *)node->GetData(); diff --git a/samples/svg/svgtest.cpp b/samples/svg/svgtest.cpp index a20c1562d7..96ba193cf8 100644 --- a/samples/svg/svgtest.cpp +++ b/samples/svg/svgtest.cpp @@ -224,8 +224,8 @@ void MyFrame::OnClose(wxCloseEvent& event) return ; } // now try the children - wxNode * pNode = m_children.GetFirst (); - wxNode * pNext ; + wxObjectList::compatibility_iterator pNode = m_children.GetFirst (); + wxObjectList::compatibility_iterator pNext ; MyChild * pChild ; while ( pNode ) { @@ -233,7 +233,7 @@ void MyFrame::OnClose(wxCloseEvent& event) pChild = (MyChild*) pNode -> GetData (); if (pChild -> Close ()) { - delete pNode ; + m_children.Erase(pNode) ; } else { -- 2.45.2