mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 07:06:21 +00:00
warning fixes: mostly size_t vs. specialized API type and other type conversion.
added player_id_t typedef and INVALID_PLAYER, use that instead of -1. also added sanity checks to cpu.cpp to ensure ARCH_* is correct (see http://www.wildfiregames.com/forum/index.php?showtopic=13327&hl=) and further predefined macros to arch.h just to be sure. This was SVN commit r8079.
This commit is contained in:
@@ -500,7 +500,7 @@ bool ScriptInterface::CallFunction_(jsval val, const char* name, size_t argc, js
|
||||
return false;
|
||||
}
|
||||
|
||||
JSBool ok = JS_CallFunctionName(m->m_cx, obj, name, argc, argv, &ret);
|
||||
JSBool ok = JS_CallFunctionName(m->m_cx, obj, name, (uintN)argc, argv, &ret);
|
||||
JS_RemoveRoot(m->m_cx, &obj);
|
||||
|
||||
return ok ? true : false;
|
||||
@@ -682,7 +682,7 @@ CScriptValRooted ScriptInterface::ParseJSON(const utf16string& string)
|
||||
return CScriptValRooted();
|
||||
}
|
||||
|
||||
if (!JS_ConsumeJSONText(m->m_cx, parser, string.c_str(), string.size()))
|
||||
if (!JS_ConsumeJSONText(m->m_cx, parser, string.c_str(), (uint32)string.size()))
|
||||
{
|
||||
LOGERROR(L"ParseJSON failed to consume");
|
||||
return CScriptValRooted();
|
||||
|
||||
Reference in New Issue
Block a user