1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-14 18:23:52 +01:00
dxvk/src/util/util_likely.h
Joshua Ashton 5c2a748d96 [util] Rename always_inline to force_inline
This conflicts with other libraries using the always_inline attribute in GCC as it defines it with the same name.
2022-08-21 21:25:54 +02:00

12 lines
266 B
C

#pragma once
#ifdef __GNUC__
#define likely(x) __builtin_expect((x),1)
#define unlikely(x) __builtin_expect((x),0)
#define force_inline inline __attribute__((always_inline))
#else
#define likely(x) (x)
#define unlikely(x) (x)
#define force_inline inline
#endif