Codechange: add annotation to selectively force inlining in debug build

This commit is contained in:
Rubidium
2023-01-24 22:50:53 +01:00
committed by rubidium42
parent df89c34e03
commit b7a5d8e296
10 changed files with 102 additions and 37 deletions

View File

@@ -29,7 +29,7 @@
* @return The selected bits, aligned to a LSB.
*/
template <typename T>
static inline uint GB(const T x, const uint8 s, const uint8 n)
debug_inline static uint GB(const T x, const uint8 s, const uint8 n)
{
return (x >> s) & (((T)1U << n) - 1);
}
@@ -100,7 +100,7 @@ static inline T AB(T &x, const uint8 s, const uint8 n, const U i)
* @return True if the bit is set, false else.
*/
template <typename T>
static inline bool HasBit(const T x, const uint8 y)
debug_inline static bool HasBit(const T x, const uint8 y)
{
return (x & ((T)1U << y)) != 0;
}