From a42b847c561ecfdcfb47b38dd89ab1b3e3d4ea1c Mon Sep 17 00:00:00 2001 From: Alcaro Date: Sat, 1 Oct 2016 19:46:49 +0200 Subject: [PATCH] +1 is better than the alternative. --- cores/libretro-imageviewer/image_core.c | 36 +++++-------------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/cores/libretro-imageviewer/image_core.c b/cores/libretro-imageviewer/image_core.c index c50ae9426c..1e92fbd332 100644 --- a/cores/libretro-imageviewer/image_core.c +++ b/cores/libretro-imageviewer/image_core.c @@ -70,51 +70,27 @@ struct string_list *file_list; static const char* IMAGE_CORE_PREFIX(valid_extensions) = "jpg|jpeg|png|bmp|psd|tga|gif|hdr|pic|ppm|pgm"; #else -static const char* IMAGE_CORE_PREFIX(valid_extensions) = - -#undef SEPARATOR +static const char* IMAGE_CORE_PREFIX(valid_extensions) = 1+ /* to remove the first |, the alternative is 25 extra lines of ifdef/etc */ #ifdef HAVE_RJPEG -# ifndef SEPARATOR -# define SEPARATOR -# else -"|" -# endif -"jpg|jpeg" +"|jpg|jpeg" #endif #ifdef HAVE_RPNG -# ifndef SEPARATOR -# define SEPARATOR -# else -"|" -# endif -"png" +"|png" #endif #ifdef HAVE_RBMP -# ifndef SEPARATOR -# define SEPARATOR -# else -"|" -# endif -"bmp" +"|bmp" #endif #ifdef HAVE_RTGA -# ifndef SEPARATOR -# define SEPARATOR -# else -"|" -# endif -"tga" +"|tga" #endif -#ifndef SEPARATOR +#if !defined(HAVE_RJPEG) && !defined(HAVE_RPNG) && !defined(HAVE_RBMP) && !defined(HAVE_RTGA) #error "can't build this core with no image formats" #endif - -#undef SEPARATOR ; #endif