X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/040e234d845d21510301a299fff77e05edc59ada..066f1b7a9580fc6c487efa753d61e3683de61407:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 2043e41e43..be19ab6146 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -2230,7 +2230,7 @@ wxAccStatus wxWindowAccessible::GetLocation(wxRect& rect, int elementId) { if (elementId <= (int) GetWindow()->GetChildren().GetCount()) { - win = (wxWindow*) GetWindow()->GetChildren().Nth(elementId-1)->GetData(); + win = GetWindow()->GetChildren().Item(elementId-1)->GetData(); } else return wxACC_FAIL; @@ -2278,7 +2278,8 @@ wxAccStatus wxWindowAccessible::Navigate(wxNavDir navDir, int fromId, case wxNAVDIR_DOWN: case wxNAVDIR_NEXT: { - wxWindowList::compatibility_iterator node = NULL; + wxWindowList::compatibility_iterator node = + wxWindowList::compatibility_iterator(); if (fromId == 0) { // Can't navigate to sibling of this window @@ -2291,12 +2292,12 @@ wxAccStatus wxWindowAccessible::Navigate(wxNavDir navDir, int fromId, else { if (fromId <= (int) GetWindow()->GetChildren().GetCount()) - node = GetWindow()->GetChildren().Nth(fromId-1); + node = GetWindow()->GetChildren().Item(fromId-1); } if (node && node->GetNext()) { - wxWindow* nextWindow = (wxWindow*) node->GetNext()->Data(); + wxWindow* nextWindow = node->GetNext()->GetData(); *toObject = nextWindow->GetOrCreateAccessible(); return wxACC_OK; } @@ -2307,7 +2308,8 @@ wxAccStatus wxWindowAccessible::Navigate(wxNavDir navDir, int fromId, case wxNAVDIR_UP: case wxNAVDIR_PREVIOUS: { - wxWindowList::compatibility_iterator node = NULL; + wxWindowList::compatibility_iterator node = + wxWindowList::compatibility_iterator(); if (fromId == 0) { // Can't navigate to sibling of this window @@ -2320,12 +2322,12 @@ wxAccStatus wxWindowAccessible::Navigate(wxNavDir navDir, int fromId, else { if (fromId <= (int) GetWindow()->GetChildren().GetCount()) - node = GetWindow()->GetChildren().Nth(fromId-1); + node = GetWindow()->GetChildren().Item(fromId-1); } if (node && node->GetPrevious()) { - wxWindow* previousWindow = (wxWindow*) node->GetPrevious()->Data(); + wxWindow* previousWindow = node->GetPrevious()->GetData(); *toObject = previousWindow->GetOrCreateAccessible(); return wxACC_OK; } @@ -2398,7 +2400,7 @@ wxAccStatus wxWindowAccessible::GetChild(int childId, wxAccessible** child) if (childId > (int) GetWindow()->GetChildren().GetCount()) return wxACC_FAIL; - wxWindow* childWindow = (wxWindow*) GetWindow()->GetChildren().Nth(childId-1)->GetData(); + wxWindow* childWindow = GetWindow()->GetChildren().Item(childId-1)->GetData(); *child = childWindow->GetOrCreateAccessible(); if (*child) return wxACC_OK;