diff --git a/talk/app/webrtc/objc/public/RTCLogging.h b/talk/app/webrtc/objc/public/RTCLogging.h index 5fb3ef0077..bcd160d921 100644 --- a/talk/app/webrtc/objc/public/RTCLogging.h +++ b/talk/app/webrtc/objc/public/RTCLogging.h @@ -81,7 +81,7 @@ extern NSString* RTCFileName(const char* filePath); #define RTCLogError(format, ...) \ RTCLogFormat(kRTCLoggingSeverityError, format, ##__VA_ARGS__) \ -#ifdef _DEBUG +#if !defined(NDEBUG) #define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__) #else #define RTCLogDebug(format, ...) \ diff --git a/talk/media/base/videoframe_unittest.h b/talk/media/base/videoframe_unittest.h index 2f72935acd..73d1a2ffbc 100644 --- a/talk/media/base/videoframe_unittest.h +++ b/talk/media/base/videoframe_unittest.h @@ -1251,7 +1251,7 @@ class VideoFrameTest : public testing::Test { // The following test that Validate crashes if the size is greater than the // actual buffer size. // TODO(fbarchard): Consider moving a filter into the capturer/plugin. -#if defined(_MSC_VER) && defined(_DEBUG) +#if defined(_MSC_VER) && !defined(NDEBUG) int ExceptionFilter(unsigned int code, struct _EXCEPTION_POINTERS *ep) { if (code == EXCEPTION_ACCESS_VIOLATION) { LOG(LS_INFO) << "Caught EXCEPTION_ACCESS_VIOLATION as expected."; diff --git a/talk/media/base/videorenderer.h b/talk/media/base/videorenderer.h index 118942eaab..0a0ee51817 100644 --- a/talk/media/base/videorenderer.h +++ b/talk/media/base/videorenderer.h @@ -28,9 +28,9 @@ #ifndef TALK_MEDIA_BASE_VIDEORENDERER_H_ #define TALK_MEDIA_BASE_VIDEORENDERER_H_ -#ifdef _DEBUG +#if !defined(NDEBUG) #include -#endif // _DEBUG +#endif #include "webrtc/base/sigslot.h" @@ -50,10 +50,10 @@ class VideoRenderer { // Called when a new frame is available for display. virtual bool RenderFrame(const VideoFrame *frame) = 0; -#ifdef _DEBUG +#if !defined(NDEBUG) // Allow renderer dumping out rendered frames. virtual bool SetDumpPath(const std::string &path) { return true; } -#endif // _DEBUG +#endif }; } // namespace cricket diff --git a/talk/session/media/srtpfilter.cc b/talk/session/media/srtpfilter.cc index 8a95b7541b..079ddfb57e 100644 --- a/talk/session/media/srtpfilter.cc +++ b/talk/session/media/srtpfilter.cc @@ -57,7 +57,7 @@ extern "C" { #ifdef ENABLE_EXTERNAL_AUTH #include "talk/session/media/externalhmac.h" #endif // ENABLE_EXTERNAL_AUTH -#ifdef _DEBUG +#if !defined(NDEBUG) extern "C" debug_module_t mod_srtp; extern "C" debug_module_t mod_auth; extern "C" debug_module_t mod_cipher; @@ -92,7 +92,7 @@ bool SrtpNotAvailable(const char *func) { void EnableSrtpDebugging() { #ifdef HAVE_SRTP -#ifdef _DEBUG +#if !defined(NDEBUG) debug_on(mod_srtp); debug_on(mod_auth); debug_on(mod_cipher);