[Scummvm-cvs-logs] SF.net SVN: scummvm:[51640] scummvm/trunk/backends/platform/ds/arm9/source/ portdefs.h

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Aug 2 19:12:53 CEST 2010


Revision: 51640
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51640&view=rev
Author:   fingolfin
Date:     2010-08-02 17:12:52 +0000 (Mon, 02 Aug 2010)

Log Message:
-----------
DS: Allow disabling assert via NDEBUG; cleanup

Modified Paths:
--------------
    scummvm/trunk/backends/platform/ds/arm9/source/portdefs.h

Modified: scummvm/trunk/backends/platform/ds/arm9/source/portdefs.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/portdefs.h	2010-08-02 17:12:34 UTC (rev 51639)
+++ scummvm/trunk/backends/platform/ds/arm9/source/portdefs.h	2010-08-02 17:12:52 UTC (rev 51640)
@@ -52,6 +52,7 @@
 #define STREAM_AUDIO_FROM_DISK
 #endif
 
+// FIXME: What is "NO_DEBUG_MSGS" good for?
 #define NO_DEBUG_MSGS
 
 // This is defined in dsmain.cpp
@@ -68,17 +69,23 @@
 #undef assert
 #endif
 
+#ifdef NDEBUG
+
+#define	assert(e)	((void)0)
+
+#else
+
+// FIXME: Shouldn't assert() also bail out / exit / halt the program? Right now we just
+// print an error message...
 #define assert(s) \
 	do { \
-		if (!(s)) \
+		if (!(s)) { \
 			consolePrintf("Assertion failed: '##s##' at file %s, line %d\n", __FILE__, __LINE__); \
+		} \
 	} while (0)
 
-//#include "ds-fs.h"
+#endif
 
-//#define debug(fmt, ...) consolePrintf(fmt, ##__VA_ARGS__)
-//#define debug(fmt, ...) debug(0, fmt, ##__VA_ARGS__)
-
 // FIXME: Since I can't change the engine at the moment (post lockdown) this define can go here.
 // This define changes the mouse-relative motion which doesn't make sense on a touch screen to
 // a more conventional form of input where the menus can be clicked on.


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list