mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00:00
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
|
||||
@@ -415,7 +415,7 @@ void CNetServerWorker::Run()
|
||||
g_Profiler2.RegisterCurrentThread("Net server");
|
||||
|
||||
// We create a new ScriptContext for this network thread, with a single ScriptInterface.
|
||||
std::shared_ptr<ScriptContext> netServerContext = ScriptContext::CreateContext();
|
||||
ScriptContext netServerContext;
|
||||
m_ScriptInterface = new ScriptInterface("Engine", "Net server", netServerContext);
|
||||
m_InitAttributes.init(m_ScriptInterface->GetGeneralJSContext(), JS::UndefinedValue());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user