提交 f196138b authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Code cleanup: avoid space when casting variables

上级 4aa8bed5
...@@ -50,7 +50,7 @@ namespace RTC { namespace RTCP ...@@ -50,7 +50,7 @@ namespace RTC { namespace RTCP
if (this->receiverReportPacket.GetCount()) if (this->receiverReportPacket.GetCount())
{ {
// Fix header length. // Fix header length.
Packet::CommonHeader* header = (Packet::CommonHeader*) this->raw; Packet::CommonHeader* header = (Packet::CommonHeader*)this->raw;
header->length += (sizeof(ReceiverReport::Header) * this->receiverReportPacket.GetCount()) / 4; header->length += (sizeof(ReceiverReport::Header) * this->receiverReportPacket.GetCount()) / 4;
ReceiverReportPacket::Iterator it = this->receiverReportPacket.Begin(); ReceiverReportPacket::Iterator it = this->receiverReportPacket.Begin();
......
...@@ -52,7 +52,7 @@ namespace RTC { namespace RTCP ...@@ -52,7 +52,7 @@ namespace RTC { namespace RTCP
messageType(messageType) messageType(messageType)
{ {
this->raw = new uint8_t[sizeof(Header)]; this->raw = new uint8_t[sizeof(Header)];
this->header = (Header*) this->raw; this->header = (Header*)this->raw;
this->header->s_ssrc = htonl(sender_ssrc); this->header->s_ssrc = htonl(sender_ssrc);
this->header->m_ssrc = htonl(media_ssrc); this->header->m_ssrc = htonl(media_ssrc);
} }
......
...@@ -66,7 +66,7 @@ namespace RTC { namespace RTCP ...@@ -66,7 +66,7 @@ namespace RTC { namespace RTCP
MS_ASSERT(length <= RpsiItem::MaxBitStringSize, "rpsi bit string length exceeds the maximum value"); MS_ASSERT(length <= RpsiItem::MaxBitStringSize, "rpsi bit string length exceeds the maximum value");
this->raw = new uint8_t[sizeof(Header)]; this->raw = new uint8_t[sizeof(Header)];
this->header = (Header*) this->raw; this->header = (Header*)this->raw;
// 32 bits padding. // 32 bits padding.
size_t padding = (-length) & 3; size_t padding = (-length) & 3;
......
...@@ -33,7 +33,7 @@ namespace RTC { namespace RTCP ...@@ -33,7 +33,7 @@ namespace RTC { namespace RTCP
MS_TRACE(); MS_TRACE();
this->raw = new uint8_t[sizeof(Header)]; this->raw = new uint8_t[sizeof(Header)];
this->header = (Header*) this->raw; this->header = (Header*)this->raw;
// Set reserved bits to zero. // Set reserved bits to zero.
std::memset(this->header, 0, sizeof(Header)); std::memset(this->header, 0, sizeof(Header));
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论