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

Unified Diff: webrtc/rtc_base/socketaddress.cc

Issue 2988153003: Replace CHECK(x && y) with two separate CHECK() calls (Closed)
Patch Set: fix mistakes Created 3 years, 4 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/rtc_base/proxyserver.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/socketaddress.cc
diff --git a/webrtc/rtc_base/socketaddress.cc b/webrtc/rtc_base/socketaddress.cc
index 5b26b9f74ac53ab0a6831dcc5653d22412cb3d81..880841410b6d64f8d5afc02eaf1f9e1a2961459a 100644
--- a/webrtc/rtc_base/socketaddress.cc
+++ b/webrtc/rtc_base/socketaddress.cc
@@ -9,6 +9,7 @@
*/
#include "webrtc/rtc_base/socketaddress.h"
+#include "webrtc/rtc_base/safe_conversions.h"
#if defined(WEBRTC_POSIX)
#include <sys/types.h>
@@ -120,8 +121,7 @@ void SocketAddress::SetResolvedIP(const IPAddress& ip) {
}
void SocketAddress::SetPort(int port) {
- RTC_DCHECK((0 <= port) && (port < 65536));
- port_ = static_cast<uint16_t>(port);
+ port_ = rtc::dchecked_cast<uint16_t>(port);
}
uint32_t SocketAddress::ip() const {
« no previous file with comments | « webrtc/rtc_base/proxyserver.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698