mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 07:17:44 +00:00
- fix w4 warnings
- add convenience macros for config_db(CFG_GET_SYS_VAL) - VFSUtil::EnumDirEnts now uses flags instead of bool recursive - UNUSED() for params, UNUSED2 (<- need better name) for variables - config.h defines must be tested with #if (always defined) -> allows detecting misspellings thanks to compiler warnings - replace debug_assert(0) with debug_warn (its sole purpose) - replace ScriptingHost::ValueToInt et al with ToPrimitive - use nommgr.h to disable both mmgr and VC debug heap This was SVN commit r2585.
This commit is contained in:
@@ -102,7 +102,7 @@ bool IEventTarget::RemoveHandler( CStrW TypeString, DOMEventHandler handler )
|
||||
return( false );
|
||||
}
|
||||
|
||||
bool IEventTarget::AddHandlerJS( JSContext* cx, uintN argc, jsval* argv )
|
||||
bool IEventTarget::AddHandlerJS( JSContext* UNUSED(cx), uintN argc, jsval* argv )
|
||||
{
|
||||
debug_assert( argc >= 2 );
|
||||
DOMEventHandler handler = new CScriptObject( argv[1] );
|
||||
@@ -119,7 +119,7 @@ bool IEventTarget::AddHandlerJS( JSContext* cx, uintN argc, jsval* argv )
|
||||
return( true );
|
||||
}
|
||||
|
||||
bool IEventTarget::RemoveHandlerJS( JSContext* cx, uintN argc, jsval* argv )
|
||||
bool IEventTarget::RemoveHandlerJS( JSContext* UNUSED(cx), uintN argc, jsval* argv )
|
||||
{
|
||||
debug_assert( argc >= 2 );
|
||||
DOMEventHandler handler = new CScriptObject( argv[1] );
|
||||
@@ -160,21 +160,21 @@ void CScriptEvent::ScriptingInit()
|
||||
CJSObject<CScriptEvent>::ScriptingInit( "Event" );
|
||||
}
|
||||
|
||||
jsval CScriptEvent::PreventDefault( JSContext* cx, uintN argc, jsval* argv )
|
||||
jsval CScriptEvent::PreventDefault( JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(argv) )
|
||||
{
|
||||
if( m_Cancelable )
|
||||
m_Cancelled = true;
|
||||
return( JSVAL_VOID );
|
||||
}
|
||||
|
||||
jsval CScriptEvent::StopPropagation( JSContext* cx, uintN argc, jsval* argv )
|
||||
jsval CScriptEvent::StopPropagation( JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(argv) )
|
||||
{
|
||||
if( m_Blockable )
|
||||
m_Blocked = true;
|
||||
return( JSVAL_VOID );
|
||||
}
|
||||
|
||||
jsval CScriptEvent::ToString( JSContext* cx, uintN argc, jsval* argv )
|
||||
jsval CScriptEvent::ToString( JSContext* cx, uintN UNUSED(argc), jsval* UNUSED(argv) )
|
||||
{
|
||||
wchar_t buffer[256];
|
||||
swprintf( buffer, 256, L"[object Event: %ls]", m_Type.c_str() );
|
||||
|
||||
Reference in New Issue
Block a user