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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.cc

Issue 2370313002: Reland of Unify rtcp packet setters (Closed)
Patch Set: Fix breaking mistype Created 4 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
Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.cc
index 3a905ba3157e8e90880fad1e621ea1772942e704..9c44547aeddac3cd491a11887af784df45aeda58 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.cc
@@ -10,6 +10,8 @@
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h"
+#include <utility>
+
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/modules/rtp_rtcp/source/byte_io.h"
@@ -137,7 +139,7 @@ bool Sdes::Parse(const CommonHeader& packet) {
return true;
}
-bool Sdes::WithCName(uint32_t ssrc, const std::string& cname) {
+bool Sdes::AddCName(uint32_t ssrc, std::string cname) {
RTC_DCHECK_LE(cname.length(), 0xffu);
if (chunks_.size() >= kMaxNumberOfChunks) {
LOG(LS_WARNING) << "Max SDES chunks reached.";
@@ -145,7 +147,7 @@ bool Sdes::WithCName(uint32_t ssrc, const std::string& cname) {
}
Chunk chunk;
chunk.ssrc = ssrc;
- chunk.cname = cname;
+ chunk.cname = std::move(cname);
chunks_.push_back(chunk);
block_length_ += ChunkSize(chunk);
return true;
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698