1
0
forked from mirrors/0ad

Adds std namespace to shared_ptr usages in scriptinterface and simulation.

This was SVN commit r25528.
This commit is contained in:
vladislavbelov
2021-05-22 19:30:18 +00:00
parent d9d19543b5
commit b927f163d6
13 changed files with 27 additions and 27 deletions
+5 -5
View File
@@ -54,12 +54,12 @@
struct ScriptInterface_impl
{
ScriptInterface_impl(const char* nativeScopeName, const shared_ptr<ScriptContext>& context);
ScriptInterface_impl(const char* nativeScopeName, const std::shared_ptr<ScriptContext>& context);
~ScriptInterface_impl();
// Take care to keep this declaration before heap rooted members. Destructors of heap rooted
// members have to be called before the context destructor.
shared_ptr<ScriptContext> m_context;
std::shared_ptr<ScriptContext> m_context;
friend ScriptRequest;
private:
@@ -302,7 +302,7 @@ bool ScriptInterface::Math_random(JSContext* cx, uint argc, JS::Value* vp)
return true;
}
ScriptInterface_impl::ScriptInterface_impl(const char* nativeScopeName, const shared_ptr<ScriptContext>& context) :
ScriptInterface_impl::ScriptInterface_impl(const char* nativeScopeName, const std::shared_ptr<ScriptContext>& context) :
m_context(context), m_cx(context->GetGeneralJSContext()), m_glob(context->GetGeneralJSContext()), m_nativeScope(context->GetGeneralJSContext())
{
JS::RealmCreationOptions creationOpt;
@@ -342,7 +342,7 @@ ScriptInterface_impl::~ScriptInterface_impl()
m_context->UnRegisterRealm(JS::GetObjectRealmOrNull(m_glob));
}
ScriptInterface::ScriptInterface(const char* nativeScopeName, const char* debugName, const shared_ptr<ScriptContext>& context) :
ScriptInterface::ScriptInterface(const char* nativeScopeName, const char* debugName, const std::shared_ptr<ScriptContext>& context) :
m(std::make_unique<ScriptInterface_impl>(nativeScopeName, context))
{
// Profiler stats table isn't thread-safe, so only enable this on the main thread
@@ -436,7 +436,7 @@ JSContext* ScriptInterface::GetGeneralJSContext() const
return m->m_context->GetGeneralJSContext();
}
shared_ptr<ScriptContext> ScriptInterface::GetContext() const
std::shared_ptr<ScriptContext> ScriptInterface::GetContext() const
{
return m->m_context;
}