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