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

Unified Diff: webrtc/base/virtualsocketserver.h

Issue 2325623002: webrtc/base: Use RTC_DCHECK() instead of assert() (Closed)
Patch Set: Created 4 years, 3 months 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
« no previous file with comments | « webrtc/base/sec_buffer.h ('k') | webrtc/base/winping.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/virtualsocketserver.h
diff --git a/webrtc/base/virtualsocketserver.h b/webrtc/base/virtualsocketserver.h
index 565222bfd2453357f6c22204446b21a92b5df93d..cce0279d32e2a786970ab9370545ea46e9033e22 100644
--- a/webrtc/base/virtualsocketserver.h
+++ b/webrtc/base/virtualsocketserver.h
@@ -11,11 +11,10 @@
#ifndef WEBRTC_BASE_VIRTUALSOCKETSERVER_H_
#define WEBRTC_BASE_VIRTUALSOCKETSERVER_H_
-#include <assert.h>
-
#include <deque>
#include <map>
+#include "webrtc/base/checks.h"
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/messagequeue.h"
#include "webrtc/base/socketserver.h"
@@ -86,7 +85,8 @@ class VirtualSocketServer : public SocketServer, public sigslot::has_slots<> {
// is separate from calculations to drop based on queue size.
double drop_probability() { return drop_prob_; }
void set_drop_probability(double drop_prob) {
- assert((0 <= drop_prob) && (drop_prob <= 1));
+ RTC_DCHECK_GE(drop_prob, 0.0);
+ RTC_DCHECK_LE(drop_prob, 1.0);
drop_prob_ = drop_prob;
}
« no previous file with comments | « webrtc/base/sec_buffer.h ('k') | webrtc/base/winping.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698