Taking a bunch of go modernize suggestions. (#4194)
This is not all of it as it is not possible (or at least I do not know of a way) to get all suggestions for a repo/project. Did this via loop searching mainly and taking the modernize suggestions.
This commit is contained in:
@@ -1296,7 +1296,7 @@ func (c *RTCClient) SendNacks(count int) {
|
||||
c.lock.Lock()
|
||||
for _, pkt := range c.lastPackets {
|
||||
seqs := make([]uint16, 0, count)
|
||||
for i := 0; i < count; i++ {
|
||||
for i := range count {
|
||||
seqs = append(seqs, pkt.SequenceNumber-uint16(i))
|
||||
}
|
||||
packets = append(packets, &rtcp.TransportLayerNack{
|
||||
|
||||
@@ -70,7 +70,7 @@ func (d *DataTrackRemote) PacketReceived(packet *datatrack.Packet) {
|
||||
if len(packet.Payload) == 0 {
|
||||
valid = false
|
||||
}
|
||||
for i := range len(packet.Payload) {
|
||||
for i := range packet.Payload {
|
||||
if packet.Payload[i] != byte(255-i) {
|
||||
valid = false
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user