Remove deprecated "description" field of cricket::ContentInfo
Bug: webrtc:10701 Change-Id: I631616fefb59b49603e0a98267b3e58d93edfb50 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169122 Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30628}
This commit is contained in:

committed by
Commit Bot

parent
c93595b4b9
commit
8e7d4bfeef
@ -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<ContentInfo*>(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();
|
||||
}
|
||||
|
||||
|
@ -441,8 +441,6 @@ class RTC_EXPORT ContentInfo {
|
||||
|
||||
void set_media_description(std::unique_ptr<MediaContentDescription> 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<MediaContentDescription> description_;
|
||||
|
||||
public:
|
||||
// Kept for backwards compatibility only.
|
||||
MediaContentDescription* description = nullptr;
|
||||
};
|
||||
|
||||
typedef std::vector<std::string> ContentNames;
|
||||
|
Reference in New Issue
Block a user