From e4ac3369dc7bb1d0ae913404f008aea1fcd92480 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 22 Feb 2016 16:47:19 -0800 Subject: Switch from _DEBUG to NDEBUG. - NDEBUG is more widely used in Chromium - _DEBUG is not defined on Mac in Chromium - Leaving _DEBUG in for standalone debug builds for the benefit of third party libraries / Windows. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1721073004 . --- core/include/fxcrt/fx_system.h | 6 +----- core/src/fxcrt/fx_basic_wstring.cpp | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'core') diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h index f4798680d3..41dc4468a6 100644 --- a/core/include/fxcrt/fx_system.h +++ b/core/include/fxcrt/fx_system.h @@ -81,10 +81,6 @@ typedef wchar_t FX_WCHAR; // Keep, maybe bad platform wchars. // TODO(palmer): it should be a |size_t|, or at least unsigned. typedef int FX_STRSIZE; -#if defined(DEBUG) && !defined(_DEBUG) -#define _DEBUG -#endif - #ifndef TRUE #define TRUE 1 #endif @@ -104,7 +100,7 @@ static_assert(FALSE == false, "false_needs_to_be_false"); #define FXSYS_assert assert #ifndef ASSERT -#ifdef _DEBUG +#ifndef NDEBUG #define ASSERT FXSYS_assert #else #define ASSERT(a) diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp index 136edd073a..396dbc4fff 100644 --- a/core/src/fxcrt/fx_basic_wstring.cpp +++ b/core/src/fxcrt/fx_basic_wstring.cpp @@ -15,7 +15,7 @@ namespace { -#if defined(_DEBUG) +#ifndef NDEBUG bool IsValidCodePage(FX_WORD codepage) { switch (codepage) { case 0: -- cgit v1.2.3