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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user