mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 00:43:40 +00:00
Fix -Wconversion warnings in simulation code.
Cast to smaller integer types explicitly. Generally avoid platform-dependent types (size_t) in simulation code. Use float versions of math.h functions, not double. This was SVN commit r10017.
This commit is contained in:
@@ -216,7 +216,7 @@ template<> jsval ScriptInterface::ToJSVal<Grid<u16> >(JSContext* cx, const Grid<
|
||||
if (!obj)
|
||||
return JSVAL_VOID;
|
||||
|
||||
size_t len = val.m_W * val.m_H;
|
||||
jsuint len = val.m_W * val.m_H;
|
||||
JSObject *darray = js_CreateTypedArray(cx, js::TypedArray::TYPE_UINT16, len);
|
||||
if (!darray)
|
||||
return JSVAL_VOID;
|
||||
|
||||
Reference in New Issue
Block a user