mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +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:
@@ -101,7 +101,7 @@ public:
|
||||
}
|
||||
|
||||
// prepare file with only read permission (boost process opens with read_write)
|
||||
auto inputFile = Trinity::make_unique_ptr_with_deleter(!input_file.empty() ? fopen(input_file.c_str(), "rb") : nullptr, &::fclose);
|
||||
auto inputFile = Trinity::make_unique_ptr_with_deleter<&::fclose>(!input_file.empty() ? fopen(input_file.c_str(), "rb") : nullptr);
|
||||
|
||||
std::error_code ec;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user