Switch usage of _DEBUG macro to NDEBUG.

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

BUG=None
R=tommi@webrtc.org
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#10468}
This commit is contained in:
tfarina
2015-10-30 16:08:48 -07:00
committed by Commit bot
parent 5c3da4b6e9
commit a41ab9326c
30 changed files with 92 additions and 92 deletions

View File

@ -77,11 +77,11 @@ size_t asccpyn(wchar_t* buffer, size_t buflen,
} else if (srclen >= buflen) {
srclen = buflen - 1;
}
#if _DEBUG
#if !defined(NDEBUG)
// Double check that characters are not UTF-8
for (size_t pos = 0; pos < srclen; ++pos)
RTC_DCHECK_LT(static_cast<unsigned char>(source[pos]), 128);
#endif // _DEBUG
#endif
std::copy(source, source + srclen, buffer);
buffer[srclen] = 0;
return srclen;