From 8bbe4c1d5e72f47716c7c4745c7f3e862696b0e5 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 18 Apr 2016 23:55:41 +0300 Subject: [PATCH] fix build on gcc 4.8 some versions of gcc want to inline DitherBitmap(), and this leads to trouble: Sources/Engine/Graphics/Graphics.cpp:1167: Error: symbol `rowLoopE' is already defined Sources/Engine/Graphics/Graphics.cpp:1170: Error: symbol `pixLoopEL' is already defined ... --- Sources/Engine/Graphics/Graphics.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Engine/Graphics/Graphics.cpp b/Sources/Engine/Graphics/Graphics.cpp index 0fa995f..30e58e8 100644 --- a/Sources/Engine/Graphics/Graphics.cpp +++ b/Sources/Engine/Graphics/Graphics.cpp @@ -663,6 +663,9 @@ static inline void IncrementByteWithClip( UBYTE &ub, SLONG slAdd) #endif // performs dithering of a 32-bit bipmap (can be in-place) +#ifdef __GNUC__ +__attribute__((noinline)) // because of asm labels +#endif void DitherBitmap( INDEX iDitherType, ULONG *pulSrc, ULONG *pulDst, PIX pixWidth, PIX pixHeight, PIX pixCanvasWidth, PIX pixCanvasHeight) {