From 7d06e37a63627efad0d472afb9bd17ff95ab5a57 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Thu, 30 Jan 2020 17:59:03 -0600 Subject: [PATCH] LibDraw: Fix building with clang --- Libraries/LibDraw/Painter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Libraries/LibDraw/Painter.cpp b/Libraries/LibDraw/Painter.cpp index 6ba7a64e54..1533f79c8f 100644 --- a/Libraries/LibDraw/Painter.cpp +++ b/Libraries/LibDraw/Painter.cpp @@ -37,7 +37,17 @@ #include #include +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC optimize("O3") +#endif + +#ifndef ALWAYS_INLINE +#if __has_attribute(always_inline) +#define ALWAYS_INLINE __attribute__((always_inline)) +#else +#define ALWAYS_INLINE inline +#endif +#endif template static ALWAYS_INLINE Color get_pixel(const GraphicsBitmap& bitmap, int x, int y)