mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 01:05:29 +00:00
Refactors smart pointers creation, reduces code duplication and improves exception safety.
This was SVN commit r24915.
This commit is contained in:
@@ -78,7 +78,7 @@ void GCSliceCallbackHook(JSContext* UNUSED(cx), JS::GCProgress progress, const J
|
||||
|
||||
shared_ptr<ScriptContext> ScriptContext::CreateContext(int contextSize, int heapGrowthBytesGCTrigger)
|
||||
{
|
||||
return shared_ptr<ScriptContext>(new ScriptContext(contextSize, heapGrowthBytesGCTrigger));
|
||||
return std::make_shared<ScriptContext>(contextSize, heapGrowthBytesGCTrigger);
|
||||
}
|
||||
|
||||
ScriptContext::ScriptContext(int contextSize, int heapGrowthBytesGCTrigger):
|
||||
|
||||
Reference in New Issue
Block a user