Permalink
Browse files

Kill more _DEBUG.

  • Loading branch information...
1 parent 5f7bf27 commit db730cf222f5840f65d53bd1123ad8705defe353 @dsalt dsalt committed Sep 14, 2012
View
@@ -152,7 +152,7 @@ static void *GPA( char *str )
}
else
{
-#if defined _DEBUG
+#ifndef NDEBUG
Com_Printf( " Loaded symbol %s (0x%08X)\n", str, rv );
#endif
return rv;
@@ -112,7 +112,7 @@ cvar_t *sv_paused;
cvar_t *cl_packetdelay;
cvar_t *sv_packetdelay;
-#if defined( _WIN32 ) && defined( _DEBUG )
+#if defined( _WIN32 ) && !defined( NDEBUG )
cvar_t *com_noErrorInterrupt;
#endif
cvar_t *com_recommendedSet;
@@ -3289,7 +3289,7 @@ void Com_Init( char *commandLine )
com_unfocused = Cvar_Get( "com_unfocused", "0", CVAR_ROM );
com_minimized = Cvar_Get( "com_minimized", "0", CVAR_ROM );
-#if defined( _WIN32 ) && defined( _DEBUG )
+#if defined( _WIN32 ) && !defined( NDEBUG )
com_noErrorInterrupt = Cvar_Get( "com_noErrorInterrupt", "0", 0 );
#endif
@@ -167,7 +167,7 @@ void DL_InitDownload()
HTAlert_setInteractive( YES );
/* And the traces... */
-#ifdef _DEBUG
+#ifndef NDEBUG
// see HTHome.c, you can specify the flags - empty string gets you all traces
HTSetTraceMessageMask( "" );
#endif
@@ -5205,7 +5205,7 @@ void FS_Restart( int checksumFeed )
// bani - check existing pid file and make sure it's ok
if ( !Com_CheckProfile( va( "profiles/%s/profile.pid", cl_profileStr ) ) )
{
-#ifndef _DEBUG
+#ifdef NDEBUG
Com_Printf(_( "^3WARNING: profile.pid found for profile '%s' – system settings will revert to defaults\n"), cl_profileStr );
// ydnar: set crashed state
Cbuf_AddText( "set com_crashed 1\n" );
@@ -2030,13 +2030,13 @@ Safe strncpy that ensures a trailing zero
=============
*/
-#ifdef _DEBUG
+#ifndef NDEBUG
void Q_strncpyzDebug( char *dest, const char *src, size_t destsize, const char *file, int line )
#else
void Q_strncpyz( char *dest, const char *src, int destsize )
#endif
{
-#ifdef _DEBUG
+#ifndef NDEBUG
if ( !dest )
{
@@ -1466,7 +1466,7 @@ double rint( double x );
// buffer size safe library replacements
// NOTE : had problem with loading QVM modules
-#ifndef _DEBUG
+#ifdef NDEBUG
void Q_strncpyz( char *dest, const char *src, int destsize );
#else
View
@@ -393,7 +393,7 @@ static void VM_InitSanity( vm_t *vm )
vm->versionChecked = qfalse;
}
-#ifdef _DEBUG
+#ifndef NDEBUG
#define VM_Insanity(c,n) Com_Error( ERR_DROP, "And it's a good night from vm. [%ld %s]", (c), (n) );
#else
#define VM_Insanity(c,n) Com_Error( ERR_DROP, "And it's a good night from vm." );
@@ -1836,7 +1836,7 @@ extern "C" {
//UINT width = rc.right - rc.left;
//UINT height = rc.bottom - rc.top;
-#ifdef _DEBUG
+#ifndef NDEBUG
createDeviceFlags |= D3D10_CREATE_DEVICE_DEBUG;
#endif
@@ -1961,7 +1961,7 @@ extern "C" {
#if 0
// create the effect
DWORD dwShaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;
-#if defined( DEBUG ) || defined( _DEBUG )
+#if defined( DEBUG ) || !defined( NDEBUG )
// Set the D3D10_SHADER_DEBUG flag to embed debug information in the shaders.
// Setting this flag improves the shader debugging experience, but still allows
// the shaders to be optimized and to run exactly the way they will run in
@@ -315,7 +315,7 @@ qhandle_t RE_RegisterModel( const char *name )
return mod->index;
}
-#ifdef _DEBUG
+#ifndef NDEBUG
else
{
ri.Printf( PRINT_WARNING, "couldn't load '%s'\n", name );
@@ -683,7 +683,7 @@ int main( int argc, char **argv )
#endif
-#ifdef _DEBUG
+#if 0 // looks like broken on !Windows; remove?
Sys_PrintCpuInfo();
Sys_PrintMemoryInfo();
#endif
View
@@ -385,7 +385,7 @@ void PRINTF_LIKE(1) NORETURN Error(const char *error, ...)
Broadcast_Shutdown();
-#if defined(_DEBUG)
+#ifndef NDEBUG
assert(0);
#endif
View
@@ -44,7 +44,7 @@ void xml_Select(char *msg, int entitynum, int brushnum, qboolean bErr
void xml_Winding(char *msg, vec3_t p[], int numpoints, qboolean die);
void xml_Point(char *msg, vec3_t pt);
-#ifdef _DEBUG
+#ifndef NDEBUG
#define DBG_XML 1
#endif
@@ -60,7 +60,7 @@ int WINS_SetSocketPort(struct sockaddr_s *addr, int port);
#define qtrue 1
#define qfalse 0
-#ifdef _DEBUG
+#ifndef NDEBUG
void PRINTF_LIKE(1) WinPrint(char *str, ...)
{
va_list argptr;
@@ -171,7 +171,7 @@ int Net_Receive(socket_t * sock, netmessage_t * msg)
return msg->size - 4;
} //end if
//the message has not been completely read yet
-#ifdef _DEBUG
+#ifndef NDEBUG
printf("++timo TODO: debug the Net_Receive on big size messages\n");
#endif
return 0;
@@ -606,7 +606,7 @@ ERROR_STRUCT errlist[] = {
{-1, NULL}
};
-#ifdef _DEBUG
+#ifndef NDEBUG
void WinPrint(char *str, ...) PRINTF_LIKE(1);
#else
void WinPrint(char *str, ...) PRINTF_LIKE(1);
View
@@ -1585,7 +1585,7 @@ void WriteMapFileDoom3(char *filename)
vec_t ST[3][5]; // [ point index ] [ xyz ST ]
- #if 0 //def _DEBUG
+ #if 0 //ndef NDEBUG
if ( f->plane.normal[0]==0.0f && f->plane.normal[1]==0.0f && f->plane.normal[2]==0.0f )
{
Sys_Printf("Warning : f->plane.normal is (0,0,0) in FaceToBrushPrimitFace\n");

0 comments on commit db730cf

Please sign in to comment.