forked from mirrors/0ad
Remove ScriptContext::CreateContext
This function nudges one into using it instead of the constructor. Even though a `std::shared_ptr` isn't required.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
/* Copyright (C) 2026 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -102,11 +102,6 @@ void GCSliceCallbackHook(JSContext*, JS::GCProgress progress, const JS::GCDescri
|
||||
#endif
|
||||
}
|
||||
|
||||
std::shared_ptr<ScriptContext> ScriptContext::CreateContext(int contextSize, uint32_t heapGrowthBytesGCTrigger)
|
||||
{
|
||||
return std::make_shared<ScriptContext>(contextSize, heapGrowthBytesGCTrigger);
|
||||
}
|
||||
|
||||
ScriptContext::ScriptContext(int contextSize, uint32_t heapGrowthBytesGCTrigger):
|
||||
m_JobQueue{std::make_unique<Script::JobQueue>()},
|
||||
m_ContextSize{contextSize},
|
||||
|
||||
Reference in New Issue
Block a user