1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-09-29 13:44:10 -04:00

remove use of buf.NewSize()

This commit is contained in:
Darien Raymond
2018-08-16 12:05:33 +02:00
parent 053fc38d38
commit fdb3a7b57d
17 changed files with 149 additions and 122 deletions

View File

@@ -229,7 +229,7 @@ func (mb *MultiBuffer) SliceBySize(size int32) MultiBuffer {
}
*mb = (*mb)[endIndex:]
if endIndex == 0 && len(*mb) > 0 {
b := NewSize(size)
b := New()
common.Must(b.Reset(ReadFullFrom((*mb)[0], size)))
return NewMultiBufferValue(b)
}