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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user