From 76c97b279206dbfb75da9047a62e6fcbe20ad64c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 18 Sep 2008 00:58:40 +0200 Subject: screen: removed empty methods Declaring empty methods is of no use. If a method is empty, we should set it to NULL in the screen_functions struct. --- src/screen_artist.c | 6 ------ src/screen_clock.c | 31 ------------------------------- src/screen_file.c | 6 ------ src/screen_search.c | 6 ------ 4 files changed, 49 deletions(-) (limited to 'src') diff --git a/src/screen_artist.c b/src/screen_artist.c index fb10afc3c..0798210b5 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -228,11 +228,6 @@ resize(int cols, int rows) lw->rows = rows; } -static void -close(void) -{ -} - static void paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c) { @@ -461,7 +456,6 @@ const struct screen_functions screen_artist = { .init = init, .exit = quit, .open = open, - .close = close, .resize = resize, .paint = paint, .update = update, diff --git a/src/screen_clock.c b/src/screen_clock.c index 11d2da1b2..cba8acdb5 100644 --- a/src/screen_clock.c +++ b/src/screen_clock.c @@ -128,26 +128,6 @@ clock_init(WINDOW *w, int cols, int rows) clock_resize(cols, rows); } -static void -clock_exit(void) -{ -} - -static void -clock_open(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c) -{ - int j; - - for (j = 0; j < 5; j++) - older[j] = newer[j] = next[j] = 0; - -} - -static void -clock_close(void) -{ -} - static const char * clock_title(mpd_unused char *str, mpd_unused size_t size) { @@ -234,22 +214,11 @@ clock_paint(screen_t *screen, mpdclient_t *c) clock_update(screen, c); } -static int -clock_cmd(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c, - mpd_unused command_t cmd) -{ - return 0; -} - const struct screen_functions screen_clock = { .init = clock_init, - .exit = clock_exit, - .open = clock_open, - .close = clock_close, .resize = clock_resize, .paint = clock_paint, .update = clock_update, - .cmd = clock_cmd, .get_title = clock_title, }; diff --git a/src/screen_file.c b/src/screen_file.c index 7fd86f645..7465ff125 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -590,11 +590,6 @@ browse_open(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c) } } -static void -browse_close(void) -{ -} - static const char * browse_title(char *str, size_t size) { @@ -748,7 +743,6 @@ const struct screen_functions screen_browse = { .init = browse_init, .exit = browse_exit, .open = browse_open, - .close = browse_close, .resize = browse_resize, .paint = browse_paint, .update = browse_update, diff --git a/src/screen_search.c b/src/screen_search.c index ce23b9098..d1b2b92d5 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -401,11 +401,6 @@ resize(int cols, int rows) lw->rows = rows; } -static void -close(void) -{ -} - static void paint(mpd_unused screen_t *screen, mpdclient_t *c) { @@ -536,7 +531,6 @@ const struct screen_functions screen_search = { .init = init, .exit = quit, .open = open, - .close = close, .resize = resize, .paint = paint, .update = update, -- cgit v1.2.3