Cosmetic: x[0:n] -> x[:n].

This commit is contained in:
Sascha L. Teichmann 2017-02-28 00:39:03 +01:00
parent 5def145564
commit 3ba10aa00a

View File

@ -41,7 +41,7 @@ func NewYOrder(renderer *Renderer, capacity int) *YOrder {
} }
func (yo *YOrder) Reset() { func (yo *YOrder) Reset() {
yo.blocks = yo.blocks[0:0] yo.blocks = yo.blocks[:0]
} }
func copyData(data []byte) []byte { func copyData(data []byte) []byte {
@ -67,7 +67,7 @@ func (yo *YOrder) RenderBlock(block *Block, colors *Colors) (err error) {
if cap(oblock.Data) < l { if cap(oblock.Data) < l {
oblock.Data = make([]byte, l, Max(l, 8*1024)) oblock.Data = make([]byte, l, Max(l, 8*1024))
} else { } else {
oblock.Data = oblock.Data[0:l] oblock.Data = oblock.Data[:l]
} }
copy(oblock.Data, block.Data) copy(oblock.Data, block.Data)
oblock.Coord = block.Coord oblock.Coord = block.Coord