From b948965eba4caa1004280b8757cdbe2b20bfd7ec Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 9 Oct 2016 13:17:40 +0200 Subject: [PATCH] Use symbolic constants rather than numeric values Zero represents 'this' object which is identified by wxACC_SELF symbol. --- src/common/wincmn.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 1d15df6bc0..77323f2498 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -3662,7 +3662,7 @@ wxAccStatus wxWindowAccessible::GetLocation(wxRect& rect, int elementId) wxCHECK( GetWindow() != NULL, wxACC_FAIL ); wxWindow* win = NULL; - if (elementId == 0) + if (elementId == wxACC_SELF) { win = GetWindow(); } @@ -3718,7 +3718,7 @@ wxAccStatus wxWindowAccessible::Navigate(wxNavDir navDir, int fromId, { wxWindowList::compatibility_iterator node = wxWindowList::compatibility_iterator(); - if (fromId == 0) + if (fromId == wxACC_SELF) { // Can't navigate to sibling of this window // if we're a top-level window. @@ -3748,7 +3748,7 @@ wxAccStatus wxWindowAccessible::Navigate(wxNavDir navDir, int fromId, { wxWindowList::compatibility_iterator node = wxWindowList::compatibility_iterator(); - if (fromId == 0) + if (fromId == wxACC_SELF) { // Can't navigate to sibling of this window // if we're a top-level window. @@ -3825,7 +3825,7 @@ wxAccStatus wxWindowAccessible::GetChild(int childId, wxAccessible** child) { wxCHECK( GetWindow() != NULL, wxACC_FAIL ); - if (childId == 0) + if (childId == wxACC_SELF) { *child = this; return wxACC_OK;