mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-18 19:19:29 +01:00
Codechange: Create ScriptAllocator with make_unique instead of new. (#14340)
This commit is contained in:
parent
b2d69ae606
commit
28cc0079f2
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user