From c176d38b7e8992f006a99950a249848ba0a0f039 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 5 Jun 2016 19:41:08 +0300 Subject: [PATCH] Fixed compilation with Clang --- src/r_draw.cpp | 4 ++-- src/r_main.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_draw.cpp b/src/r_draw.cpp index 2e21c7038..e809342e9 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -5076,7 +5076,7 @@ void R_SetColorMapLight(FColormap *base_colormap, float light, int shade) dc_shade_constants.fade_green = dc_fcolormap->Fade.g; dc_shade_constants.fade_blue = dc_fcolormap->Fade.b; dc_shade_constants.fade_alpha = dc_fcolormap->Fade.a; - dc_shade_constants.desaturate = MIN(std::abs(dc_fcolormap->Desaturate), 255) * 255 / 256; + dc_shade_constants.desaturate = MIN(abs(dc_fcolormap->Desaturate), 255) * 255 / 256; dc_shade_constants.simple_shade = (dc_fcolormap->Color.d == 0x00ffffff && dc_fcolormap->Fade.d == 0x00000000 && dc_fcolormap->Desaturate == 0); if (r_swtruecolor) { @@ -5101,7 +5101,7 @@ void R_SetDSColorMapLight(FColormap *base_colormap, float light, int shade) ds_shade_constants.fade_green = ds_fcolormap->Fade.g; ds_shade_constants.fade_blue = ds_fcolormap->Fade.b; ds_shade_constants.fade_alpha = ds_fcolormap->Fade.a; - ds_shade_constants.desaturate = MIN(std::abs(ds_fcolormap->Desaturate), 255) * 255 / 256; + ds_shade_constants.desaturate = MIN(abs(ds_fcolormap->Desaturate), 255) * 255 / 256; ds_shade_constants.simple_shade = (ds_fcolormap->Color.d == 0x00ffffff && ds_fcolormap->Fade.d == 0x00000000 && ds_fcolormap->Desaturate == 0); if (r_swtruecolor) { diff --git a/src/r_main.h b/src/r_main.h index 5266fb52c..5d4ff1174 100644 --- a/src/r_main.h +++ b/src/r_main.h @@ -115,7 +115,7 @@ inline uint32_t calc_light_multiplier(dsfixed_t light) #if defined(_MSC_VER) #define FORCEINLINE __forceinline #elif defined(__GNUC__) -#define FORCEINLINE __attribute__((always_inline)) +#define FORCEINLINE __attribute__((always_inline)) inline #else #define FORCEINLINE inline #endif