mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Utilities: Extend make_unique_ptr_with_deleter functionality to allow it to create deleters with compile time constant functions (reduces its size to just sizeof(void*))
This commit is contained in:
@@ -46,7 +46,7 @@ bool LoadGameObjectModelList(std::string const& dataPath)
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
auto model_list_file = Trinity::make_unique_ptr_with_deleter(fopen((dataPath + "vmaps/" + VMAP::GAMEOBJECT_MODELS).c_str(), "rb"), &::fclose);
|
||||
auto model_list_file = Trinity::make_unique_ptr_with_deleter<&::fclose>(fopen((dataPath + "vmaps/" + VMAP::GAMEOBJECT_MODELS).c_str(), "rb"));
|
||||
if (!model_list_file)
|
||||
{
|
||||
TC_LOG_ERROR("misc", "Unable to open '{}' file.", VMAP::GAMEOBJECT_MODELS);
|
||||
|
||||
Reference in New Issue
Block a user