From 7e2955b75c55fa25e6127a59104e85d523b3b474 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 30 Dec 2002 20:08:40 +0000 Subject: [PATCH] Corrected accidental pointer arithmetic in DoClientToScreen and vice versa git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 8 ++++---- src/mac/window.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 26c54353c6..b2ca1df78f 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -391,9 +391,9 @@ void wxWindowMac::DoScreenToClient(int *x, int *y) const MacRootWindowToWindow( x , y ) ; if ( x ) - x -= MacGetLeftBorderSize() ; + (*x) -= MacGetLeftBorderSize() ; if ( y ) - y -= MacGetTopBorderSize() ; + (*y) -= MacGetTopBorderSize() ; } void wxWindowMac::DoClientToScreen(int *x, int *y) const @@ -401,9 +401,9 @@ void wxWindowMac::DoClientToScreen(int *x, int *y) const WindowRef window = (WindowRef) MacGetRootWindow() ; if ( x ) - x += MacGetLeftBorderSize() ; + (*x) += MacGetLeftBorderSize() ; if ( y ) - y += MacGetTopBorderSize() ; + (*y) += MacGetTopBorderSize() ; MacWindowToRootWindow( x , y ) ; diff --git a/src/mac/window.cpp b/src/mac/window.cpp index 26c54353c6..b2ca1df78f 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -391,9 +391,9 @@ void wxWindowMac::DoScreenToClient(int *x, int *y) const MacRootWindowToWindow( x , y ) ; if ( x ) - x -= MacGetLeftBorderSize() ; + (*x) -= MacGetLeftBorderSize() ; if ( y ) - y -= MacGetTopBorderSize() ; + (*y) -= MacGetTopBorderSize() ; } void wxWindowMac::DoClientToScreen(int *x, int *y) const @@ -401,9 +401,9 @@ void wxWindowMac::DoClientToScreen(int *x, int *y) const WindowRef window = (WindowRef) MacGetRootWindow() ; if ( x ) - x += MacGetLeftBorderSize() ; + (*x) += MacGetLeftBorderSize() ; if ( y ) - y += MacGetTopBorderSize() ; + (*y) += MacGetTopBorderSize() ; MacWindowToRootWindow( x , y ) ;