From 8e7d4bfeef2429831e4e81ba01cc945e7c6ff07c Mon Sep 17 00:00:00 2001 From: Harald Alvestrand Date: Wed, 26 Feb 2020 09:32:30 +0100 Subject: [PATCH] Remove deprecated "description" field of cricket::ContentInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:10701 Change-Id: I631616fefb59b49603e0a98267b3e58d93edfb50 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169122 Reviewed-by: Henrik Boström Commit-Queue: Harald Alvestrand Cr-Commit-Position: refs/heads/master@{#30628} --- pc/session_description.cc | 25 +------------------------ pc/session_description.h | 6 ------ 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/pc/session_description.cc b/pc/session_description.cc index 4881f4d293..87d6667270 100644 --- a/pc/session_description.cc +++ b/pc/session_description.cc @@ -262,13 +262,6 @@ const ContentGroup* SessionDescription::GetGroupByName( } ContentInfo::~ContentInfo() { - if (description_ && description_.get() != description) { - // If description_ is null, we assume that a move operator - // has been applied. - RTC_LOG(LS_ERROR) << "ContentInfo::description has been updated by " - "assignment. This usage is deprecated."; - description_.reset(description); // ensure that it is destroyed. - } } // Copy operator. @@ -277,8 +270,7 @@ ContentInfo::ContentInfo(const ContentInfo& o) type(o.type), rejected(o.rejected), bundle_only(o.bundle_only), - description_(o.description_->Clone()), - description(description_.get()) {} + description_(o.description_->Clone()) {} ContentInfo& ContentInfo::operator=(const ContentInfo& o) { name = o.name; @@ -286,29 +278,14 @@ ContentInfo& ContentInfo::operator=(const ContentInfo& o) { rejected = o.rejected; bundle_only = o.bundle_only; description_ = o.description_->Clone(); - description = description_.get(); return *this; } const MediaContentDescription* ContentInfo::media_description() const { - if (description_.get() != description) { - // Someone's updated |description|, or used a move operator - // on the record. - RTC_LOG(LS_ERROR) << "ContentInfo::description has been updated by " - "assignment. This usage is deprecated."; - const_cast(this)->description_.reset(description); - } return description_.get(); } MediaContentDescription* ContentInfo::media_description() { - if (description_.get() != description) { - // Someone's updated |description|, or used a move operator - // on the record. - RTC_LOG(LS_ERROR) << "ContentInfo::description has been updated by " - "assignment. This usage is deprecated."; - description_.reset(description); - } return description_.get(); } diff --git a/pc/session_description.h b/pc/session_description.h index 7aaf259027..b2506a4248 100644 --- a/pc/session_description.h +++ b/pc/session_description.h @@ -441,8 +441,6 @@ class RTC_EXPORT ContentInfo { void set_media_description(std::unique_ptr desc) { description_ = std::move(desc); - // For backwards compatibility only. - description = description_.get(); } // TODO(bugs.webrtc.org/8620): Rename this to mid. @@ -454,10 +452,6 @@ class RTC_EXPORT ContentInfo { private: friend class SessionDescription; std::unique_ptr description_; - - public: - // Kept for backwards compatibility only. - MediaContentDescription* description = nullptr; }; typedef std::vector ContentNames;