diff options
author | joshua stein <jcs@jcs.org> | 2020-01-30 17:59:03 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-05 18:39:45 +0100 |
commit | 7d06e37a63627efad0d472afb9bd17ff95ab5a57 (patch) | |
tree | 760c750c3380090df56d769c59658b97b038f26c /Libraries | |
parent | f5ecb31fc8183c699e8fc4834fd1f96195063a9b (diff) | |
download | serenity-7d06e37a63627efad0d472afb9bd17ff95ab5a57.zip |
LibDraw: Fix building with clang
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibDraw/Painter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 <stdio.h> #include <unistd.h> +#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<GraphicsBitmap::Format format = GraphicsBitmap::Format::Invalid> static ALWAYS_INLINE Color get_pixel(const GraphicsBitmap& bitmap, int x, int y) |