forked from mirrors/0ad
Encapsulate runtime creation.
- Makes it easier to change down the line (and change is coming) - Allows making g_ScriptRuntime thread-local easily. - Remove ParentRuntime, which is not used at the moment. Part of the SM52 migration, stage: SM45 compatible. Patch by: Itms Tested By: Freagarach Refs #4893 Differential Revision: https://code.wildfiregames.com/D3087 This was SVN commit r24171.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "lib/sysdep/sysdep.h"
|
||||
#include "ps/Profiler2.h"
|
||||
#include "scriptinterface/ScriptEngine.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRuntime.h"
|
||||
|
||||
class LeakReporter : public CxxTest::GlobalFixture
|
||||
{
|
||||
@@ -80,7 +80,7 @@ class MiscSetup : public CxxTest::GlobalFixture
|
||||
|
||||
g_Profiler2.Initialise();
|
||||
m_ScriptEngine = new ScriptEngine;
|
||||
g_ScriptRuntime = ScriptInterface::CreateRuntime();
|
||||
g_ScriptRuntime = ScriptRuntime::CreateRuntime();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user