Fixed loads of /W4 warnings, because it's easier than doing anything useful. Added some asserts to check potentially dangerous assumptions, implemented a few missing bits of code, adjusted some comments, etc.

This was SVN commit r814.
This commit is contained in:
Ykkrosh
2004-07-24 14:04:40 +00:00
parent 3f7797b762
commit fe1bee706b
33 changed files with 153 additions and 162 deletions
+5 -3
View File
@@ -54,8 +54,6 @@ IGUIObject::IGUIObject() :
bool hidden=true;
GUI<bool>::GetSetting(this, "hidden", hidden);
int hej=23;
}
IGUIObject::~IGUIObject()
@@ -464,8 +462,12 @@ void IGUIObject::ScriptEvent(const CStr& Action)
jsval result;
JSBool ok = JS_CallFunction(g_ScriptingHost.getContext(), jsGuiObject, (JSFunction*)((*it).second), 1, paramData, &result);
if (!ok)
{
JS_ReportError(g_ScriptingHost.getContext(), "Errors executing script action \"%s\"", Action.c_str());
}
// Allow the temporary parameters to be collected
// Allow the temporary parameters to be garbage-collected
JS_RemoveRoot(g_ScriptingHost.getContext(), &mouseObj);
JS_RemoveRoot(g_ScriptingHost.getContext(), &jsGuiObject);
}