diff --git a/apu/bapu/snes/snes.hpp b/apu/bapu/snes/snes.hpp index e8dccfe0..eb6e8193 100644 --- a/apu/bapu/snes/snes.hpp +++ b/apu/bapu/snes/snes.hpp @@ -5,17 +5,6 @@ #include "../../resampler.h" #include "../../../msu1.h" -#if defined(__GNUC__) - #define inline inline - #define alwaysinline inline __attribute__((always_inline)) -#elif defined(_MSC_VER) - #define inline inline - #define alwaysinline inline __forceinline -#else - #define inline inline - #define alwaysinline inline -#endif - #define debugvirtual namespace SNES diff --git a/filter/xbrz.cpp b/filter/xbrz.cpp index 2f6b4b01..9033c0d1 100644 --- a/filter/xbrz.cpp +++ b/filter/xbrz.cpp @@ -74,15 +74,6 @@ uint32_t gradientARGB(uint32_t pixFront, uint32_t pixBack) //find intermediate c // -#ifdef _MSC_VER - #define FORCE_INLINE __forceinline -#elif defined __GNUC__ - #define FORCE_INLINE __attribute__((always_inline)) inline -#else - #define FORCE_INLINE inline -#endif - - enum RotationDegree //clock-wise { ROT_0, @@ -268,7 +259,7 @@ input kernel area naming convention: ----------------- */ template -FORCE_INLINE //detect blend direction +alwaysinline //detect blend direction BlendResult preProcessCorners(const Kernel_4x4& ker, const xbrz::ScalerCfg& cfg) //result: F, G, J, K corners of "GradientType" { BlendResult result = {}; @@ -378,7 +369,7 @@ input kernel area naming convention: ------------- */ template -FORCE_INLINE //perf: quite worth it! +alwaysinline //perf: quite worth it! void blendPixel(const Kernel_3x3& ker, uint32_t* target, int trgWidth, unsigned char blendInfo, //result of preprocessing all four corners of pixel "e" diff --git a/port.h b/port.h index 8b13951f..73ea7cb1 100644 --- a/port.h +++ b/port.h @@ -44,6 +44,14 @@ #define PIXEL_FORMAT RGB565 #endif +#if defined(__GNUC__) +#define alwaysinline inline __attribute__((always_inline)) +#elif defined(_MSC_VER) +#define alwaysinline __forceinline +#else +#define alwaysinline inline +#endif + #ifndef snes9x_types_defined #define snes9x_types_defined typedef unsigned char bool8;