mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-07-06 01:50:42 +02:00
Small cleanup. Moved min to common/math.
This commit is contained in:
@ -51,7 +51,7 @@ func (yo *YOrder) Reset() {
|
||||
|
||||
func copyData(data []byte) []byte {
|
||||
l := len(data)
|
||||
ndata := make([]byte, l, max(l, 8*1024))
|
||||
ndata := make([]byte, l, Max(l, 8*1024))
|
||||
copy(ndata, data)
|
||||
return ndata
|
||||
}
|
||||
@ -70,7 +70,7 @@ func (yo *YOrder) RenderBlock(block *Block, colors *Colors) (err error) {
|
||||
err = yo.Renderer.RenderBlock(oblock, colors)
|
||||
l := len(block.Data)
|
||||
if cap(oblock.Data) < l {
|
||||
oblock.Data = make([]byte, l, max(l, 8*1024))
|
||||
oblock.Data = make([]byte, l, Max(l, 8*1024))
|
||||
} else {
|
||||
oblock.Data = oblock.Data[0:l]
|
||||
}
|
||||
|
Reference in New Issue
Block a user