mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 07:17:44 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user