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

Unified Diff: webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h

Issue 3013623002: Fix no_size_t_to_int_warning in rtp_rtcp:rtp_rtcp_format target (Closed)
Patch Set: . Created 3 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/modules/rtp_rtcp/BUILD.gn ('k') | webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h
diff --git a/webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h b/webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h
index dcb48b63e652430ea5f63d64751f12e0e6fc9021..59ab582cb77368dc6ee3311f84f8fa65f64cc5d9 100644
--- a/webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h
+++ b/webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h
@@ -29,23 +29,23 @@ struct RtpExtensionSize {
class RtpHeaderExtensionMap {
public:
static constexpr RTPExtensionType kInvalidType = kRtpExtensionNone;
- static constexpr uint8_t kInvalidId = 0;
+ static constexpr int kInvalidId = 0;
RtpHeaderExtensionMap();
explicit RtpHeaderExtensionMap(rtc::ArrayView<const RtpExtension> extensions);
template <typename Extension>
- bool Register(uint8_t id) {
+ bool Register(int id) {
return Register(id, Extension::kId, Extension::kUri);
}
- bool RegisterByType(uint8_t id, RTPExtensionType type);
- bool RegisterByUri(uint8_t id, const std::string& uri);
+ bool RegisterByType(int id, RTPExtensionType type);
+ bool RegisterByUri(int id, const std::string& uri);
bool IsRegistered(RTPExtensionType type) const {
return GetId(type) != kInvalidId;
}
// Return kInvalidType if not found.
- RTPExtensionType GetType(uint8_t id) const {
+ RTPExtensionType GetType(int id) const {
RTC_DCHECK_GE(id, kMinId);
RTC_DCHECK_LE(id, kMaxId);
return types_[id];
@@ -61,15 +61,15 @@ class RtpHeaderExtensionMap {
rtc::ArrayView<const RtpExtensionSize> extensions) const;
// TODO(danilchap): Remove use of the functions below.
- int32_t Register(RTPExtensionType type, uint8_t id) {
+ int32_t Register(RTPExtensionType type, int id) {
return RegisterByType(id, type) ? 0 : -1;
}
int32_t Deregister(RTPExtensionType type);
private:
- static constexpr uint8_t kMinId = 1;
- static constexpr uint8_t kMaxId = 14;
- bool Register(uint8_t id, RTPExtensionType type, const char* uri);
+ static constexpr int kMinId = 1;
+ static constexpr int kMaxId = 14;
+ bool Register(int id, RTPExtensionType type, const char* uri);
RTPExtensionType types_[kMaxId + 1];
uint8_t ids_[kRtpExtensionNumberOfExtensions];
« no previous file with comments | « webrtc/modules/rtp_rtcp/BUILD.gn ('k') | webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698