1
0
forked from mirrors/0ad

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:
Ykkrosh
2011-08-16 11:18:32 +00:00
parent b40b5b8414
commit 609f1643d5
34 changed files with 308 additions and 263 deletions
@@ -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;