Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: webrtc/common_types.h

Issue 2535643002: Replace some asserts with DCHECKs (Closed)
Patch Set: Replace some asserts with DCHECKs Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/common_types.h
diff --git a/webrtc/common_types.h b/webrtc/common_types.h
index 3a0d6d8cc544ff4c608e34a8fd04facb2aa59fa8..2988bf9f41a6fb8763cb31342217e24b4fe8d879 100644
--- a/webrtc/common_types.h
+++ b/webrtc/common_types.h
@@ -11,13 +11,13 @@
#ifndef WEBRTC_COMMON_TYPES_H_
#define WEBRTC_COMMON_TYPES_H_
-#include <assert.h>
#include <stddef.h>
#include <string.h>
#include <string>
#include <vector>
+#include "webrtc/base/checks.h"
#include "webrtc/base/optional.h"
#include "webrtc/common_video/rotation.h"
#include "webrtc/typedefs.h"
@@ -805,13 +805,13 @@ struct RtpPacketCounter {
}
void Subtract(const RtpPacketCounter& other) {
- assert(header_bytes >= other.header_bytes);
+ RTC_DCHECK_GE(header_bytes, other.header_bytes);
header_bytes -= other.header_bytes;
- assert(payload_bytes >= other.payload_bytes);
+ RTC_DCHECK_GE(payload_bytes, other.payload_bytes);
payload_bytes -= other.payload_bytes;
- assert(padding_bytes >= other.padding_bytes);
+ RTC_DCHECK_GE(padding_bytes, other.padding_bytes);
padding_bytes -= other.padding_bytes;
- assert(packets >= other.packets);
+ RTC_DCHECK_GE(packets, other.packets);
packets -= other.packets;
}

Powered by Google App Engine
This is Rietveld 408576698