mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:47:44 +00:00
AK+LibJS: Remove OFFSET_OF and its users
With the LibJS JIT removed, let's not expose pointers to internal members.
This commit is contained in:
parent
4646a87eba
commit
d878975f95
14 changed files with 0 additions and 53 deletions
|
@ -318,9 +318,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
static FlatPtr value_offset() { return OFFSET_OF(Optional, m_storage); }
|
||||
static FlatPtr has_value_offset() { return OFFSET_OF(Optional, m_has_value); }
|
||||
|
||||
private:
|
||||
alignas(T) u8 m_storage[sizeof(T)];
|
||||
bool m_has_value { false };
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
#include <AK/Assertions.h>
|
||||
|
||||
#define OFFSET_OF(class, member) __builtin_offsetof(class, member)
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<typename T, typename U>
|
||||
|
|
|
@ -811,8 +811,6 @@ public:
|
|||
AK::swap(at(i), at(size() - i - 1));
|
||||
}
|
||||
|
||||
static FlatPtr outline_buffer_offset() { return OFFSET_OF(Vector, m_outline_buffer); }
|
||||
|
||||
private:
|
||||
void reset_capacity()
|
||||
{
|
||||
|
|
|
@ -42,8 +42,6 @@ public:
|
|||
|
||||
void revoke() { m_ptr = nullptr; }
|
||||
|
||||
static FlatPtr ptr_offset() { return OFFSET_OF(WeakLink, m_ptr); }
|
||||
|
||||
private:
|
||||
template<typename T>
|
||||
explicit WeakLink(T& weakable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue