[Bf-blender-cvs] [3f2cf6d] master: Cleanup: remove _DEBUG define usage

Campbell Barton noreply at git.blender.org
Wed Aug 27 11:00:26 CEST 2014


Commit: 3f2cf6da6f53f1969755dd26b92ab19719e6f00a
Author: Campbell Barton
Date:   Wed Aug 27 18:57:53 2014 +1000
Branches: master
https://developer.blender.org/rB3f2cf6da6f53f1969755dd26b92ab19719e6f00a

Cleanup: remove _DEBUG define usage

===================================================================

M	intern/ghost/intern/GHOST_DisplayManagerX11.cpp
M	intern/ghost/intern/GHOST_SystemPathsWin32.cpp
M	source/blender/gpu/GPU_buffers.h
M	source/blender/imbuf/intern/openexr/openexr_api.cpp
M	source/gameengine/Expressions/Expression.cpp
M	source/gameengine/Expressions/Expression.h
M	source/gameengine/Expressions/IntValue.cpp
M	source/gameengine/Expressions/Value.cpp
M	source/gameengine/Expressions/Value.h
M	source/gameengine/GameLogic/Joystick/SCA_JoystickDefines.h

===================================================================

diff --git a/intern/ghost/intern/GHOST_DisplayManagerX11.cpp b/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
index a545789..24289e6 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
@@ -194,7 +194,7 @@ setCurrentDisplaySetting(
 		fprintf(stderr, "Error: XF86VidMode extension missing!\n");
 		return GHOST_kFailure;
 	}
-#  ifdef _DEBUG
+#  ifdef DEBUG
 	printf("Using XFree86-VidModeExtension Version %d.%d\n",
 	       majorVersion, minorVersion);
 #  endif
@@ -240,7 +240,7 @@ setCurrentDisplaySetting(
 		}
 
 		if (best_fit != -1) {
-#  ifdef _DEBUG
+#  ifdef DEBUG
 			printf("Switching to video mode %dx%d %dx%d %d\n",
 			       vidmodes[best_fit]->hdisplay, vidmodes[best_fit]->vdisplay,
 			       vidmodes[best_fit]->htotal, vidmodes[best_fit]->vtotal,
diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp b/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
index 3a313c7..2bd3800 100644
--- a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
@@ -37,7 +37,7 @@
 #include <shlobj.h>
 #include "utfconv.h"
 
-#if defined(__MINGW32__) || defined(__CYGWIN__)
+#ifdef __MINGW32__
 
 #if !defined(SHARD_PIDL)
 #define SHARD_PIDL      0x00000001L
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h
index 461995e..ba461d5 100644
--- a/source/blender/gpu/GPU_buffers.h
+++ b/source/blender/gpu/GPU_buffers.h
@@ -32,11 +32,11 @@
 #ifndef __GPU_BUFFERS_H__
 #define __GPU_BUFFERS_H__
 
-#ifdef _DEBUG
-/*#define DEBUG_VBO(X) printf(X)*/
-#define DEBUG_VBO(X)
+#ifdef DEBUG
+/*  #define DEBUG_VBO(X) printf(X)*/
+#  define DEBUG_VBO(X)
 #else
-#define DEBUG_VBO(X)
+#  define DEBUG_VBO(X)
 #endif
 
 struct BMesh;
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index b8b7d15..ba1bda6 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -48,7 +48,7 @@ extern "C"
 {
 
 // The following prevents a linking error in debug mode for MSVC using the libs in CVS
-#if defined(WITH_OPENEXR) && defined(_WIN32) && defined(_DEBUG) && !defined(__MINGW32__) && !defined(__CYGWIN__)
+#if defined(WITH_OPENEXR) && defined(_WIN32) && defined(DEBUG) && !defined(__MINGW32__)
 _CRTIMP void __cdecl _invalid_parameter_noinfo(void)
 {
 }
diff --git a/source/gameengine/Expressions/Expression.cpp b/source/gameengine/Expressions/Expression.cpp
index c1146aa..2428df9 100644
--- a/source/gameengine/Expressions/Expression.cpp
+++ b/source/gameengine/Expressions/Expression.cpp
@@ -21,13 +21,13 @@
 //////////////////////////////////////////////////////////////////////
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
-#ifdef _DEBUG
+#ifdef DEBUG
 //int gRefCountExpr;
 #endif
 CExpression::CExpression()// : m_cached_calculate(NULL)
 {
 	m_refcount = 1;
-#ifdef _DEBUG
+#ifdef DEBUG
 	//gRefCountExpr++;
 #endif
 }
diff --git a/source/gameengine/Expressions/Expression.h b/source/gameengine/Expressions/Expression.h
index d1b7eda..9a4f1f9 100644
--- a/source/gameengine/Expressions/Expression.h
+++ b/source/gameengine/Expressions/Expression.h
@@ -116,7 +116,7 @@ public:
 
 	virtual CExpression * AddRef() { // please leave multiline, for debugger !!!
 
-#ifdef _DEBUG
+#ifdef DEBUG
 		//gRefCountExpr++;
 		assertd(m_refcount < 255);
 #endif
@@ -124,7 +124,7 @@ public:
 		return this;
 	};
 	virtual CExpression* Release(CExpression* complicatedtrick=NULL) { 
-#ifdef _DEBUG
+#ifdef DEBUG
 		//gRefCountExpr--;
 #endif
 		if (--m_refcount < 1) 
diff --git a/source/gameengine/Expressions/IntValue.cpp b/source/gameengine/Expressions/IntValue.cpp
index a2d0559..82d2e94 100644
--- a/source/gameengine/Expressions/IntValue.cpp
+++ b/source/gameengine/Expressions/IntValue.cpp
@@ -35,7 +35,7 @@ effect: constructs a new CIntValue
 */
 {
 	
-#ifdef _DEBUG_
+#ifdef DEBUG_
 	m_textval = "Int illegal constructor";
 #endif
 	m_pstrRep=NULL;
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp
index 1ced71e..bdef2db 100644
--- a/source/gameengine/Expressions/Value.cpp
+++ b/source/gameengine/Expressions/Value.cpp
@@ -86,7 +86,7 @@ struct SmartCValueRef
 std::vector<SmartCValueRef> gRefList;
 #endif
 
-#ifdef _DEBUG
+#ifdef DEBUG
 //int gRefCountValue;
 #endif
 
@@ -101,7 +101,7 @@ effect: constucts a CValue
 */
 {
 	//debug(gRefCountValue++)	// debugging
-#ifdef _DEBUG
+#ifdef DEBUG
 	//gRefCountValue++;
 #ifdef CVALUE_DEBUG
 	gRefList.push_back(SmartCValueRef(this));
@@ -460,7 +460,7 @@ void CValue::DisableRefCount()
 	m_refcount--;
 
 	//debug(gRefCountValue--);
-#ifdef _DEBUG
+#ifdef DEBUG
 	//gRefCountValue--;
 #endif
 	m_ValFlags.RefCountDisabled=true;
@@ -472,7 +472,7 @@ void CValue::ProcessReplica() /* was AddDataToReplica in 2.48 */
 {
 	m_refcount = 1;
 	
-#ifdef _DEBUG
+#ifdef DEBUG
 	//gRefCountValue++;
 #endif
 	PyObjectPlus::ProcessReplica();
diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h
index 7f6ce9a..c7e9a40 100644
--- a/source/gameengine/Expressions/Value.h
+++ b/source/gameengine/Expressions/Value.h
@@ -90,7 +90,7 @@ enum VALUE_DATA_TYPE {
 
 
 
-#ifdef _DEBUG
+#ifdef DEBUG
 //extern int gRefCountValue;		// debugonly variable to check if all CValue Refences are Dereferenced at programexit
 #endif
 
@@ -251,7 +251,7 @@ public:
 		// Increase global reference count, used to see at the end of the program
 		// if all CValue-derived classes have been dereferenced to 0
 		//debug(gRefCountValue++);
-#ifdef _DEBUG
+#ifdef DEBUG
 		//gRefCountValue++;
 #endif
 		m_refcount++; 
@@ -264,7 +264,7 @@ public:
 		// Decrease global reference count, used to see at the end of the program
 		// if all CValue-derived classes have been dereferenced to 0
 		//debug(gRefCountValue--);
-#ifdef _DEBUG
+#ifdef DEBUG
 		//gRefCountValue--;
 #endif
 		// Decrease local reference count, if it reaches 0 the object should be freed
diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickDefines.h b/source/gameengine/GameLogic/Joystick/SCA_JoystickDefines.h
index 37c867e..566e556 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_JoystickDefines.h
+++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickDefines.h
@@ -36,7 +36,7 @@
 #undef main
 #endif
 
-#ifndef _DEBUG
+#ifndef DEBUG
 #  define JOYSTICK_ECHO(x)
 #else
 #  include <iostream>




More information about the Bf-blender-cvs mailing list