dlls/user32/edit.c -- code refactorization
Gerald Pfeifer
gerald at pfeifer.com
Mon Jan 7 08:11:09 CST 2008
Looking at dlls/user32/edit.c it seems one piece there really is a
bit over-"abstracted", which the following patch tries to address.
It always gets rid of two -Wextra warnings, but the main idea is
really to make this simpler -- just look at the number of lines
removed. :)
Gerald
ChangeLog:
Factor in EDIT_WM_EraseBkGnd().
Index: dlls/user32/edit.c
===================================================================
RCS file: /home/wine/wine/dlls/user32/edit.c,v
retrieving revision 1.16
diff -u -3 -p -r1.16 edit.c
--- dlls/user32/edit.c 20 Nov 2007 16:56:17 -0000 1.16
+++ dlls/user32/edit.c 7 Jan 2008 14:02:11 -0000
@@ -263,7 +263,6 @@ static void EDIT_WM_ContextMenu(EDITSTAT
static void EDIT_WM_Copy(EDITSTATE *es);
static LRESULT EDIT_WM_Create(EDITSTATE *es, LPCWSTR name);
static LRESULT EDIT_WM_Destroy(EDITSTATE *es);
-static LRESULT EDIT_WM_EraseBkGnd(EDITSTATE *es, HDC dc);
static INT EDIT_WM_GetText(const EDITSTATE *es, INT count, LPWSTR dst, BOOL unicode);
static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos);
static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key);
@@ -893,7 +892,8 @@ static LRESULT WINAPI EditWndProc_common
break;
case WM_ERASEBKGND:
- result = EDIT_WM_EraseBkGnd(es, (HDC)wParam);
+ /* we do the proper erase in EDIT_WM_Paint */
+ result = 1;
break;
case WM_GETFONT:
@@ -4260,18 +4260,6 @@ static LRESULT EDIT_WM_Destroy(EDITSTATE
/*********************************************************************
*
- * WM_ERASEBKGND
- *
- */
-static LRESULT EDIT_WM_EraseBkGnd(EDITSTATE *es, HDC dc)
-{
- /* we do the proper erase in EDIT_WM_Paint */
- return 1;
-}
-
-
-/*********************************************************************
- *
* WM_GETTEXT
*
*/
More information about the wine-patches
mailing list