# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1080805732 0 # Node ID a95f39e81fe2f864cdf6fbc393e0ebd8c433d3a2 # Parent f65fc3a049ff457279532bc2bb48348fa1ef570c Fixed optimization errors on Windows. diff -r f65fc3a049ff -r a95f39e81fe2 win/dw.c --- a/win/dw.c Thu Apr 01 07:42:17 2004 +0000 +++ b/win/dw.c Thu Apr 01 07:48:52 2004 +0000 @@ -2691,13 +2691,17 @@ void _handle_splitbar_resize(HWND hwnd, float percent, int type, int x, int y) { + HWND handle1, handle2; + Box *tmp; + if(type == DW_HORZ) { int newx = x; float ratio = (float)percent/(float)100.0; - HWND handle1 = (HWND)dw_window_get_data(hwnd, "_dw_topleft"); - HWND handle2 = (HWND)dw_window_get_data(hwnd, "_dw_bottomright"); - Box *tmp = (Box *)GetWindowLongPtr(handle1, GWLP_USERDATA); + + handle1 = (HWND)dw_window_get_data(hwnd, "_dw_topleft"); + handle2 = (HWND)dw_window_get_data(hwnd, "_dw_bottomright"); + tmp = (Box *)GetWindowLongPtr(handle1, GWLP_USERDATA); newx = (int)((float)newx * ratio) - (SPLITBAR_WIDTH/2); @@ -2720,9 +2724,10 @@ { int newy = y; float ratio = (float)(100.0-percent)/(float)100.0; - HWND handle1 = (HWND)dw_window_get_data(hwnd, "_dw_bottomright"); - HWND handle2 = (HWND)dw_window_get_data(hwnd, "_dw_topleft"); - Box *tmp = (Box *)GetWindowLongPtr(handle1, GWLP_USERDATA); + + handle1 = (HWND)dw_window_get_data(hwnd, "_dw_bottomright"); + handle2 = (HWND)dw_window_get_data(hwnd, "_dw_topleft"); + tmp = (Box *)GetWindowLongPtr(handle1, GWLP_USERDATA); newy = (int)((float)newy * ratio) - (SPLITBAR_WIDTH/2);