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

Unified Diff: webrtc/base/nattypes.cc

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/maccocoathreadhelper.mm ('k') | webrtc/base/physicalsocketserver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/nattypes.cc
diff --git a/webrtc/base/nattypes.cc b/webrtc/base/nattypes.cc
index 890a6640954be4df3a62419702c2243feff8e728..1e37698f0da5f9d794e74f6b3b9593dee61c3c69 100644
--- a/webrtc/base/nattypes.cc
+++ b/webrtc/base/nattypes.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <assert.h>
-
#include "webrtc/base/nattypes.h"
+#include "webrtc/base/checks.h"
+
namespace rtc {
class SymmetricNAT : public NAT {
@@ -44,11 +44,17 @@ public:
NAT* NAT::Create(NATType type) {
switch (type) {
- case NAT_OPEN_CONE: return new OpenConeNAT();
- case NAT_ADDR_RESTRICTED: return new AddressRestrictedNAT();
- case NAT_PORT_RESTRICTED: return new PortRestrictedNAT();
- case NAT_SYMMETRIC: return new SymmetricNAT();
- default: assert(0); return 0;
+ case NAT_OPEN_CONE:
+ return new OpenConeNAT();
+ case NAT_ADDR_RESTRICTED:
+ return new AddressRestrictedNAT();
+ case NAT_PORT_RESTRICTED:
+ return new PortRestrictedNAT();
+ case NAT_SYMMETRIC:
+ return new SymmetricNAT();
+ default:
+ RTC_NOTREACHED();
+ return 0;
}
}
« no previous file with comments | « webrtc/base/maccocoathreadhelper.mm ('k') | webrtc/base/physicalsocketserver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698