diff --git a/src/Components/Modules/Voice.cpp b/src/Components/Modules/Voice.cpp index edc84cca..1629656f 100644 --- a/src/Components/Modules/Voice.cpp +++ b/src/Components/Modules/Voice.cpp @@ -1,5 +1,4 @@ #include -#include "Game/Engine/LargeLocal.hpp" namespace Components { @@ -40,8 +39,8 @@ namespace Components Game::msg_t msg{}; const auto clientNum = client - Game::svs_clients; - const Game::Engine::LargeLocal msg_buf_large_local(0x10000); - auto* msg_buf = static_cast(msg_buf_large_local.GetBuf()); + const auto msg_buf_large = std::make_unique(0x10000); + auto* msg_buf = msg_buf_large.get(); assert(VoicePacketCount[clientNum] >= 0); diff --git a/src/Game/Engine/LargeLocal.hpp b/src/Game/Engine/LargeLocal.hpp index 7dfccab4..12fbfe9d 100644 --- a/src/Game/Engine/LargeLocal.hpp +++ b/src/Game/Engine/LargeLocal.hpp @@ -13,7 +13,7 @@ namespace Game::Engine LargeLocal& operator=(LargeLocal&&) = delete; LargeLocal& operator=(const LargeLocal&) = delete; - void* GetBuf() const; + [[nodiscard]] void* GetBuf() const; private: void PopBuf();