aboutsummaryrefslogtreecommitdiff
path: root/src/universe.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-04-29 17:39:09 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2025-04-29 17:39:09 +0200
commitc3f84bfe9c37df94abaff9eaf73cba23ede32c44 (patch)
tree5f6cf341dfc33bf10f62ac51d0cd5e415d0d8c9b /src/universe.cpp
parent313b2bbea87101fdd629a2a48b47c75d35b5c501 (diff)
downloadlanes-c3f84bfe9c37df94abaff9eaf73cba23ede32c44.tar.gz
lanes-c3f84bfe9c37df94abaff9eaf73cba23ede32c44.tar.bz2
lanes-c3f84bfe9c37df94abaff9eaf73cba23ede32c44.zip
Move ProtectedAllocator::Protected_lua_Alloc in universe.cpp
Diffstat (limited to 'src/universe.cpp')
-rw-r--r--src/universe.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/universe.cpp b/src/universe.cpp
index 0f41585..06f7f21 100644
--- a/src/universe.cpp
+++ b/src/universe.cpp
@@ -51,6 +51,16 @@ static constexpr RegistryUniqueKey kUniverseFullRegKey{ 0x1C2D76870DD9DD9Full };
51 51
52// ################################################################################################# 52// #################################################################################################
53 53
54[[nodiscard]]
55void* ProtectedAllocator::Protected_lua_Alloc(void* const ud_, void* const ptr_, size_t const osize_, size_t const nsize_)
56{
57 ProtectedAllocator* const _allocator{ static_cast<ProtectedAllocator*>(ud_) };
58 std::lock_guard<std::mutex> _guard{ _allocator->mutex };
59 return _allocator->alloc(ptr_, osize_, nsize_);
60}
61
62// #################################################################################################
63
54Universe::Universe() 64Universe::Universe()
55{ 65{
56 //--- 66 //---