1
0
forked from mirrors/0ad

# Fixed some warnings and potentially misleading code

* Removed ToJSVal<jsval> because it's treated as ToJSVal<long> and
causes minor confusion and/or compiler errors.
   Changed script interface functions to return either C++ types or a
jsval_t wrapper.
 * Replaced some C casts with static_cast to avoid significant confusion
and to cause compiler errors instead.
 * Removed some redundant argument-checking code. Simplified some
string-generating code.
 * Fixed some "dereferencing type-punned pointer will break
strict-aliasing rules" warnings (from `g++ -O3`).

This was SVN commit r5115.
This commit is contained in:
Ykkrosh
2007-05-29 19:01:21 +00:00
parent 5919fc7877
commit fba692c8b5
30 changed files with 261 additions and 253 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ public:
SColour &operator = (const SColour &o);
jsval ToString( JSContext* cx, uintN argc, jsval* argv );
CStr ToString( JSContext* cx, uintN argc, jsval* argv );
static void ScriptingInit();
static JSBool Construct( JSContext* cx, JSObject* obj, uint argc, jsval* argv, jsval* rval );
};