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

Unified Diff: webrtc/base/safe_conversions.h

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 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/rtccertificate.cc ('k') | webrtc/base/stringencode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/safe_conversions.h
diff --git a/webrtc/base/safe_conversions.h b/webrtc/base/safe_conversions.h
index 7fc67cb67a6eb44ed33f6cfa3dcc32587bcf6853..51239bc65dd33ceec4bf68ce7ce8d662dbaa13c9 100644
--- a/webrtc/base/safe_conversions.h
+++ b/webrtc/base/safe_conversions.h
@@ -32,13 +32,13 @@ inline bool IsValueInRangeForNumericType(Src value) {
// overflow or underflow. NaN source will always trigger a CHECK.
template <typename Dst, typename Src>
inline Dst checked_cast(Src value) {
- CHECK(IsValueInRangeForNumericType<Dst>(value));
+ RTC_CHECK(IsValueInRangeForNumericType<Dst>(value));
return static_cast<Dst>(value);
}
// saturated_cast<> is analogous to static_cast<> for numeric types, except
// that the specified numeric conversion will saturate rather than overflow or
-// underflow. NaN assignment to an integral will trigger a CHECK condition.
+// underflow. NaN assignment to an integral will trigger a RTC_CHECK condition.
template <typename Dst, typename Src>
inline Dst saturated_cast(Src value) {
// Optimization for floating point values, which already saturate.
« no previous file with comments | « webrtc/base/rtccertificate.cc ('k') | webrtc/base/stringencode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698