LibDraw: Fix building with clang

This commit is contained in:
joshua stein 2020-01-30 17:59:03 -06:00 committed by Andreas Kling
parent f5ecb31fc8
commit 7d06e37a63
Notes: sideshowbarker 2024-07-19 09:37:50 +09:00

View file

@ -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)