Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.
NOTRY=true
BUG=webrtc:6451
Review-Url: https://codereview.webrtc.org/2384693002
Cr-Commit-Position: refs/heads/master@{#14474}
diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h
index 6ae49f7..44f941e 100644
--- a/webrtc/base/buffer.h
+++ b/webrtc/base/buffer.h
@@ -349,7 +349,7 @@
// Called when *this has been moved from. Conceptually it's a no-op, but we
// can mutate the state slightly to help subsequent sanity checks catch bugs.
void OnMovedFrom() {
-#ifdef NDEBUG
+#if RTC_DCHECK_IS_ON
// Make *this consistent and empty. Shouldn't be necessary, but better safe
// than sorry.
size_ = 0;