forked from mirrors/0ad
Various minor optimisations.
Enable SpiderMonkey method JIT in Release mode. Add Engine.ProfileStart/Engine.ProfileStop functions for scripts. Fix AI to clone initial entity data and shared metadata. This was SVN commit r9003.
This commit is contained in:
@@ -220,7 +220,7 @@ template<> jsval ScriptInterface::ToJSVal<CStr8>(JSContext* cx, const CStr8& val
|
||||
|
||||
template<typename T> static jsval ToJSVal_vector(JSContext* cx, const std::vector<T>& val)
|
||||
{
|
||||
JSObject* obj = JS_NewArrayObject(cx, 0, NULL);
|
||||
JSObject* obj = JS_NewArrayObject(cx, val.size(), NULL);
|
||||
if (!obj)
|
||||
return JSVAL_VOID;
|
||||
for (size_t i = 0; i < val.size(); ++i)
|
||||
|
||||
Reference in New Issue
Block a user