mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-11 20:00:39 +02:00
JSONPool: Make allocator funcs internally linked
Makes it a little more explicit that these aren't used outside of this TU.
This commit is contained in:
1 parent
48a51679b8
commit
e83e9cb6b3
1 file changed
+11
-14
+11
-14
@@ -2,22 +2,19 @@
|
||||
#include "Common/JSONPool.h"
|
||||
|
||||
namespace FEX::JSON {
|
||||
json_t* PoolInit(jsonPool_t* Pool);
|
||||
json_t* PoolAlloc(jsonPool_t* Pool);
|
||||
static json_t* PoolInit(jsonPool_t* Pool) {
|
||||
auto* alloc = static_cast<JsonAllocator*>(Pool);
|
||||
return &*alloc->json_objects.emplace(alloc->json_objects.end());
|
||||
}
|
||||
|
||||
static json_t* PoolAlloc(jsonPool_t* Pool) {
|
||||
auto* alloc = static_cast<JsonAllocator*>(Pool);
|
||||
return &*alloc->json_objects.emplace(alloc->json_objects.end());
|
||||
}
|
||||
|
||||
JsonAllocator::JsonAllocator()
|
||||
: jsonPool_t {
|
||||
.init = FEX::JSON::PoolInit,
|
||||
.alloc = FEX::JSON::PoolAlloc,
|
||||
.init = PoolInit,
|
||||
.alloc = PoolAlloc,
|
||||
} {}
|
||||
|
||||
json_t* PoolInit(jsonPool_t* Pool) {
|
||||
JsonAllocator* alloc = static_cast<JsonAllocator*>(Pool);
|
||||
return &*alloc->json_objects.emplace(alloc->json_objects.end());
|
||||
}
|
||||
|
||||
json_t* PoolAlloc(jsonPool_t* Pool) {
|
||||
JsonAllocator* alloc = static_cast<JsonAllocator*>(Pool);
|
||||
return &*alloc->json_objects.emplace(alloc->json_objects.end());
|
||||
}
|
||||
} // namespace FEX::JSON
|
||||
Reference in new issue
Block a user