1
0
forked from mirrors/0ad

Refactors smart pointers creation, reduces code duplication and improves exception safety.

This was SVN commit r24915.
This commit is contained in:
vladislavbelov
2021-02-13 23:53:40 +00:00
parent 425f19b8ac
commit 7a71011149
21 changed files with 34 additions and 34 deletions
+1 -1
View File
@@ -365,7 +365,7 @@ void ScriptInterface_impl::Register(const char* name, JSNative fptr, uint nargs)
}
ScriptInterface::ScriptInterface(const char* nativeScopeName, const char* debugName, const shared_ptr<ScriptContext>& context) :
m(new ScriptInterface_impl(nativeScopeName, context))
m(std::make_unique<ScriptInterface_impl>(nativeScopeName, context))
{
// Profiler stats table isn't thread-safe, so only enable this on the main thread
if (Threading::IsMainThread())