mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 21:46:55 +00:00
Use ScriptInterface::CreateObject for ToJSVal<CColor>, and for ToJSVal<Grid<u8> >, ToJSVal<Grid<u16> > used by the AIManager obtaining the pathfinder grid.
Make that function static, so that it can be used for these functions without slowly having to obtain the ScriptInterface instance using GetScriptInterfaceAndCBData just to get the JSContext again. Remove few redundant conversions for CreateObject arguments. Differential Revision: https://code.wildfiregames.com/D2128 Tested on: gcc 9.1.0, clang 8.0.1, Jenkins Tedious performance testing in: D2128, D2127 This was SVN commit r22894.
This commit is contained in:
@@ -314,9 +314,11 @@ TOJSVAL_CHAR(17)
|
||||
TOJSVAL_CHAR(18)
|
||||
TOJSVAL_CHAR(19)
|
||||
TOJSVAL_CHAR(20)
|
||||
TOJSVAL_CHAR(24)
|
||||
TOJSVAL_CHAR(29)
|
||||
TOJSVAL_CHAR(33)
|
||||
TOJSVAL_CHAR(35)
|
||||
TOJSVAL_CHAR(256)
|
||||
#undef TOJSVAL_CHAR
|
||||
|
||||
template<> void ScriptInterface::ToJSVal<CStrW>(JSContext* cx, JS::MutableHandleValue ret, const CStrW& val)
|
||||
|
||||
Reference in New Issue
Block a user