Replace RTC_DCHECK(false) with RTC_NOTREACHED().
Bulk of changes done using
git grep -l 'RTC_DCHECK(false)' | \
xargs sed -i 's/RTC_DCHECK(false)/RTC_NOTREACHED()/'
peerconnection.cc also used RTC_DCHECK(false && "msg") in two places,
which were updated manually.
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2623313004
Cr-Commit-Position: refs/heads/master@{#16026}
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index 2f21e0c..1a29e55 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -327,7 +327,7 @@
default:
// We shouldn't get to this point with an invalid service_type, we should
// have returned an error already.
- RTC_DCHECK(false) << "Unexpected service type";
+ RTC_NOTREACHED() << "Unexpected service type";
return RTCErrorType::INTERNAL_ERROR;
}
return RTCErrorType::NONE;
@@ -548,7 +548,7 @@
std::string cname;
if (!rtc::CreateRandomString(kRtcpCnameLength, &cname)) {
LOG(LS_ERROR) << "Failed to generate CNAME.";
- RTC_DCHECK(false);
+ RTC_NOTREACHED();
}
return cname;
}
@@ -1617,7 +1617,7 @@
break;
}
default:
- RTC_DCHECK(false && "Not implemented");
+ RTC_NOTREACHED() << "Not implemented";
break;
}
}
@@ -2042,7 +2042,7 @@
} else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
CreateVideoReceiver(stream, track_id, ssrc);
} else {
- RTC_DCHECK(false && "Invalid media type");
+ RTC_NOTREACHED() << "Invalid media type";
}
}