mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:57:35 +00:00
AK: Add ALWAYS_INLINE, NEVER_INLINE and FLATTEN macros
It's tedious to write (and look at) [[gnu::always_inline]] etc. :^)
This commit is contained in:
parent
f1a8fb1e88
commit
888e35f0fe
14 changed files with 63 additions and 56 deletions
|
@ -118,7 +118,7 @@ public:
|
|||
void mask(u16 m) { m_address &= m; }
|
||||
|
||||
template<typename T>
|
||||
[[gnu::always_inline]] inline T in()
|
||||
ALWAYS_INLINE T in()
|
||||
{
|
||||
if constexpr (sizeof(T) == 4)
|
||||
return IO::in32(get());
|
||||
|
@ -130,7 +130,7 @@ public:
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
[[gnu::always_inline]] inline void out(T value)
|
||||
ALWAYS_INLINE void out(T value)
|
||||
{
|
||||
if constexpr (sizeof(T) == 4) {
|
||||
IO::out32(get(), value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue