Open Bug 1391573 Opened 8 years ago Updated 3 years ago

Clean up unnecessary copies in rtp module

Categories

(Core :: WebRTC, defect, P4)

defect

Tracking

()

People

(Reporter: ng, Unassigned)

Details

There are several places the compiler is warning of unnecessary copies: 26:43.17 In file included from tmp/moz/opt/mozilla-inbound/obj-x86_64-apple-darwin16.7.0/media/webrtc/trunk/webrtc/modules/modules_rtp_rtcp/Unified_cpp_webrtc_modules2.cpp:29: 26:43.17 hg/mozilla-inbound/media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc:441:32: warning: loop variable 'report_block' of type 'const rtcp::ReportBlock' creates a copy from type 'const rtcp::ReportBlock' [-Wrange-loop-analysis] 26:43.17 for (const rtcp::ReportBlock report_block : sender_report.report_blocks()) 26:43.17 ^ 26:43.17 hg/mozilla-inbound/media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc:441:8: note: use reference type 'const rtcp::ReportBlock &' to prevent copying 26:43.17 for (const rtcp::ReportBlock report_block : sender_report.report_blocks()) 26:43.17 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 26:43.17 In file included from tmp/moz/opt/mozilla-inbound/obj-x86_64-apple-darwin16.7.0/media/webrtc/trunk/webrtc/modules/modules_rtp_rtcp/Unified_cpp_webrtc_modules2.cpp:38: 26:43.17 hg/mozilla-inbound/media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc:514:19: warning: loop variable 'it' of type 'const std::__1::pair<const unsigned int, std::__1::basic_string<char> >' creates a copy from type 'const std::__1::pair<const unsigned int, std::__1::basic_string<char> >' [-Wrange-loop-analysis] 26:43.17 for (const auto it : csrc_cnames_) 26:43.17 ^ 26:43.17 hg/mozilla-inbound/media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc:514:8: note: use reference type 'const std::__1::pair<const unsigned int, std::__1::basic_string<char> > &' to prevent copying 26:43.17 for (const auto it : csrc_cnames_)
Mass change P3->P4 to align with new Mozilla triage process.
Priority: P3 → P4
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.