mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-14 18:19:11 +00:00
Codechange: Create ScriptAllocator with make_unique instead of new. (#14340)
This commit is contained in:
@@ -508,7 +508,7 @@ bool Squirrel::CreateClassInstance(const std::string &class_name, void *real_ins
|
||||
}
|
||||
|
||||
Squirrel::Squirrel(std::string_view api_name) :
|
||||
api_name(api_name), allocator(new ScriptAllocator())
|
||||
api_name(api_name), allocator(std::make_unique<ScriptAllocator>())
|
||||
{
|
||||
this->Initialize();
|
||||
}
|
||||
|
Reference in New Issue
Block a user