26 static inline void release8(
const char*& a_entry)
33 static inline void release16(
const wchar_t*& a_entry)
43 std::uint16_t expected{ 0 };
49 }
while (!flags.compare_exchange_weak(expected,
static_cast<std::uint16_t
>(expected + 1)));
52 [[nodiscard]]
constexpr std::uint16_t
crc() const noexcept {
return _crc; }
55 [[nodiscard]]
const T*
data() const noexcept;
58 [[nodiscard]] inline const
char*
data<
char>() const noexcept
64 [[nodiscard]]
inline const wchar_t* data<wchar_t>() const noexcept
70 [[nodiscard]]
constexpr std::uint32_t
size() const noexcept {
return length(); }
72 [[nodiscard]]
inline const char*
u8() const noexcept
75 return reinterpret_cast<const char*
>(
this + 1);
78 [[nodiscard]]
inline const wchar_t*
u16() const noexcept
81 return reinterpret_cast<const wchar_t*
>(
this + 1);
84 [[nodiscard]]
constexpr bool wide() const noexcept {
return static_cast<bool>(
_flags &
kWide); }
89 volatile std::uint16_t
_crc;
96 static_assert(
sizeof(Entry) == 0x18);
98 static_assert(std::is_empty_v<BSStringPool>);
#define RELOCATION_ID(a_se, a_ae)
Definition PCH.h:794
Definition BSStringPool.h:14
constexpr bool wide() const noexcept
Definition BSStringPool.h:84
constexpr std::uint32_t length() const noexcept
Definition BSStringPool.h:69
std::uint32_t _length
Definition BSStringPool.h:92
static void release16(const wchar_t *&a_entry)
Definition BSStringPool.h:33
Entry * _left
Definition BSStringPool.h:87
constexpr std::uint16_t crc() const noexcept
Definition BSStringPool.h:52
static void release(const char *&a_entry)
Definition BSStringPool.h:23
@ kRefCountMask
Definition BSStringPool.h:19
@ kLengthMask
Definition BSStringPool.h:20
@ kWide
Definition BSStringPool.h:18
constexpr std::uint32_t size() const noexcept
Definition BSStringPool.h:70
volatile std::uint16_t _crc
Definition BSStringPool.h:89
const char * u8() const noexcept
Definition BSStringPool.h:72
static void release(const wchar_t *&a_entry)
Definition BSStringPool.h:24
Entry * _right
Definition BSStringPool.h:93
std::uint16_t _flags
Definition BSStringPool.h:88
const wchar_t * u16() const noexcept
Definition BSStringPool.h:78
static void release8(const char *&a_entry)
Definition BSStringPool.h:26
const T * data() const noexcept
void acquire()
Definition BSStringPool.h:40
Definition Relocation.h:1638
Definition AbsorbEffect.h:6
char * GlobalStringHandle
Definition BSStringPool.h:7
wchar_t * GlobalStringHandleW
Definition BSStringPool.h:8
Definition BSStringPool.h:11
Definition BSStringPool.h:101
HashMask
Definition BSStringPool.h:103
@ kEntryIndexMask
Definition BSStringPool.h:104
@ kLockIndexMask
Definition BSStringPool.h:105
bool initialized
Definition BSStringPool.h:113
BSStringPool::Entry * buckets[0x10000]
Definition BSStringPool.h:111
static BucketTable * GetSingleton()
BSSpinLock locks[0x10000/0x800]
Definition BSStringPool.h:112