talk: Use NDEBUG macro.

NDEBUG is a standard macro with the semantic "Not Debug" for C89, C99, C++98,
  C++2003, C++2011, C++2014 standards. There are no _DEBUG macros in the
  standards.

_DEBUG is a macro Visual Studio defines when you specify the /MTd or /MDd
option.

http://stackoverflow.com/a/29253284/5237416

This should help fix the TODO in third_party/libjingle/libjingle.gyp

BUG=None
R=sergeyu@chromium.org

Review URL: https://codereview.webrtc.org/1419733004

Cr-Commit-Position: refs/heads/master@{#10377}
This commit is contained in:
tfarina
2015-10-22 16:15:21 -07:00
committed by Commit bot
parent c80741f895
commit ff134ebd3d
4 changed files with 8 additions and 8 deletions

View File

@ -81,7 +81,7 @@ extern NSString* RTCFileName(const char* filePath);
#define RTCLogError(format, ...) \ #define RTCLogError(format, ...) \
RTCLogFormat(kRTCLoggingSeverityError, format, ##__VA_ARGS__) \ RTCLogFormat(kRTCLoggingSeverityError, format, ##__VA_ARGS__) \
#ifdef _DEBUG #if !defined(NDEBUG)
#define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__) #define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__)
#else #else
#define RTCLogDebug(format, ...) \ #define RTCLogDebug(format, ...) \

View File

@ -1251,7 +1251,7 @@ class VideoFrameTest : public testing::Test {
// The following test that Validate crashes if the size is greater than the // The following test that Validate crashes if the size is greater than the
// actual buffer size. // actual buffer size.
// TODO(fbarchard): Consider moving a filter into the capturer/plugin. // 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) { int ExceptionFilter(unsigned int code, struct _EXCEPTION_POINTERS *ep) {
if (code == EXCEPTION_ACCESS_VIOLATION) { if (code == EXCEPTION_ACCESS_VIOLATION) {
LOG(LS_INFO) << "Caught EXCEPTION_ACCESS_VIOLATION as expected."; LOG(LS_INFO) << "Caught EXCEPTION_ACCESS_VIOLATION as expected.";

View File

@ -28,9 +28,9 @@
#ifndef TALK_MEDIA_BASE_VIDEORENDERER_H_ #ifndef TALK_MEDIA_BASE_VIDEORENDERER_H_
#define TALK_MEDIA_BASE_VIDEORENDERER_H_ #define TALK_MEDIA_BASE_VIDEORENDERER_H_
#ifdef _DEBUG #if !defined(NDEBUG)
#include <string> #include <string>
#endif // _DEBUG #endif
#include "webrtc/base/sigslot.h" #include "webrtc/base/sigslot.h"
@ -50,10 +50,10 @@ class VideoRenderer {
// Called when a new frame is available for display. // Called when a new frame is available for display.
virtual bool RenderFrame(const VideoFrame *frame) = 0; virtual bool RenderFrame(const VideoFrame *frame) = 0;
#ifdef _DEBUG #if !defined(NDEBUG)
// Allow renderer dumping out rendered frames. // Allow renderer dumping out rendered frames.
virtual bool SetDumpPath(const std::string &path) { return true; } virtual bool SetDumpPath(const std::string &path) { return true; }
#endif // _DEBUG #endif
}; };
} // namespace cricket } // namespace cricket

View File

@ -57,7 +57,7 @@ extern "C" {
#ifdef ENABLE_EXTERNAL_AUTH #ifdef ENABLE_EXTERNAL_AUTH
#include "talk/session/media/externalhmac.h" #include "talk/session/media/externalhmac.h"
#endif // ENABLE_EXTERNAL_AUTH #endif // ENABLE_EXTERNAL_AUTH
#ifdef _DEBUG #if !defined(NDEBUG)
extern "C" debug_module_t mod_srtp; extern "C" debug_module_t mod_srtp;
extern "C" debug_module_t mod_auth; extern "C" debug_module_t mod_auth;
extern "C" debug_module_t mod_cipher; extern "C" debug_module_t mod_cipher;
@ -92,7 +92,7 @@ bool SrtpNotAvailable(const char *func) {
void EnableSrtpDebugging() { void EnableSrtpDebugging() {
#ifdef HAVE_SRTP #ifdef HAVE_SRTP
#ifdef _DEBUG #if !defined(NDEBUG)
debug_on(mod_srtp); debug_on(mod_srtp);
debug_on(mod_auth); debug_on(mod_auth);
debug_on(mod_cipher); debug_on(mod_cipher);