mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-02-02 03:00:20 +01:00
remove old compress workaround needed for pre Go 1.7
This commit is contained in:
parent
79d36d6dd8
commit
032237261d
@ -276,9 +276,9 @@ func NewDecodedBlock(data []byte, colors *Colors) (db *DecodedBlock, err error)
|
|||||||
|
|
||||||
// There is a bug before Go 1.7 that enforces
|
// There is a bug before Go 1.7 that enforces
|
||||||
// to add 4 as an offset after the compressed
|
// to add 4 as an offset after the compressed
|
||||||
// geometry data. This is resolved via build tags
|
// geometry data. As we now require at least 1.20
|
||||||
// and definitions in pre17offset.go and
|
// this is no longer an issue.
|
||||||
// post17offset.go.
|
const afterCompressOfs = 0
|
||||||
offset += buf.Pos + afterCompressOfs
|
offset += buf.Pos + afterCompressOfs
|
||||||
buf.Pos = 0
|
buf.Pos = 0
|
||||||
if offset >= dataLen {
|
if offset >= dataLen {
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
// Copyright 2016 by Sascha L. Teichmann
|
|
||||||
// Use of this source code is governed by the MIT license
|
|
||||||
// that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
// +build go1.7
|
|
||||||
|
|
||||||
package common
|
|
||||||
|
|
||||||
// afterCompressOfs is not necessary after Go 1.7.
|
|
||||||
const afterCompressOfs = 0
|
|
@ -1,10 +0,0 @@
|
|||||||
// Copyright 2016 by Sascha L. Teichmann
|
|
||||||
// Use of this source code is governed by the MIT license
|
|
||||||
// that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
// +build !go1.7
|
|
||||||
|
|
||||||
package common
|
|
||||||
|
|
||||||
// afterCompressOfs is necessary before Go 1.7.
|
|
||||||
const afterCompressOfs = 4
|
|
Loading…
Reference in New Issue
Block a user