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:
janwas
2010-09-05 09:38:30 +00:00
parent 178d45d0e2
commit 2e7436434d
29 changed files with 110 additions and 71 deletions
+2 -2
View File
@@ -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();