提交 59c968e1 authored 作者: José Luis Millán's avatar José Luis Millán

worker: Add pointer and const qualifications to auto-typed variables

上级 be8fb3fd
......@@ -54,7 +54,7 @@ namespace RTC
{
MS_TRACE();
auto& rtpParameters = producer->GetRtpParameters();
const auto& rtpParameters = producer->GetRtpParameters();
// Add entries into the ssrcTable.
for (auto& encoding : rtpParameters.encodings)
......
......@@ -182,8 +182,8 @@ namespace RTC
if (this->transmissionCounter.GetPacketCount() == 0u)
return nullptr;
auto ntp = Utils::Time::TimeMs2Ntp(nowMs);
auto report = new RTC::RTCP::SenderReport();
auto ntp = Utils::Time::TimeMs2Ntp(nowMs);
auto* report = new RTC::RTCP::SenderReport();
// Calculate TS difference between now and maxPacketMs.
auto diffMs = nowMs - this->maxPacketMs;
......
......@@ -306,7 +306,7 @@ namespace RTC
len,
this->maxSctpMessageSize);
auto& parameters = dataConsumer->GetSctpStreamParameters();
const auto& parameters = dataConsumer->GetSctpStreamParameters();
// Fill stcp_sendv_spa.
struct sctp_sendv_spa spa; // NOLINT(cppcoreguidelines-pro-type-member-init)
......
......@@ -32,7 +32,7 @@ namespace RTC
{
MS_TRACE();
auto& sctpParameters = dataProducer->GetSctpStreamParameters();
const auto& sctpParameters = dataProducer->GetSctpStreamParameters();
// Add entries into the streamIdTable.
auto streamId = sctpParameters.streamId;
......
......@@ -807,8 +807,8 @@ namespace RTC
request->Accept(data);
// Check if Transport Congestion Control client must be created.
auto& rtpHeaderExtensionIds = consumer->GetRtpHeaderExtensionIds();
auto& codecs = consumer->GetRtpParameters().codecs;
const auto& rtpHeaderExtensionIds = consumer->GetRtpHeaderExtensionIds();
auto& codecs = consumer->GetRtpParameters().codecs;
// Set TransportCongestionControlClient.
if (!this->tccClient)
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论