From 781fd777ebdb32c582a38bbbeea7605a2de99880 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Mon, 8 Dec 2014 22:42:27 +0100 Subject: [PATCH] WINGs: remove constants used for default width+height for the widget As pointed by gcc, the height is never used and the code make use of the SCROLLER_WIDTH constant anyway, so this patch updates the code to directly use that constant instead of intermediate values that just adds noise for code maintainability. Signed-off-by: Christophe CURIS --- WINGs/wscroller.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/WINGs/wscroller.c b/WINGs/wscroller.c index 4a5ae8c4..f1daa3a6 100644 --- a/WINGs/wscroller.c +++ b/WINGs/wscroller.c @@ -64,8 +64,6 @@ typedef struct W_Scroller { } flags; } Scroller; -#define DEFAULT_HEIGHT 60 -#define DEFAULT_WIDTH SCROLLER_WIDTH #define DEFAULT_ARROWS_POSITION WSAMinEnd #define BUTTON_SIZE ((SCROLLER_WIDTH) - 4) @@ -108,7 +106,7 @@ WMScroller *WMCreateScroller(WMWidget * parent) WMCreateEventHandler(sPtr->view, ExposureMask | StructureNotifyMask | ClientMessageMask, handleEvents, sPtr); - W_ResizeView(sPtr->view, DEFAULT_WIDTH, DEFAULT_WIDTH); + W_ResizeView(sPtr->view, SCROLLER_WIDTH, SCROLLER_WIDTH); sPtr->flags.arrowsPosition = DEFAULT_ARROWS_POSITION; WMCreateEventHandler(sPtr->view, ButtonPressMask | ButtonReleaseMask