Fix error by linter

This commit is contained in:
Masaaki Goshima 2021-02-19 15:34:56 +09:00
parent 9d4348e66b
commit e60eabf9da
2 changed files with 1 additions and 10 deletions

View File

@ -19,9 +19,9 @@ type opcode struct {
isTaggedKey bool // whether tagged key isTaggedKey bool // whether tagged key
anonymousKey bool // whether anonymous key anonymousKey bool // whether anonymous key
root bool // whether root root bool // whether root
indent int // indent number
rshiftNum uint8 // use to take bit for judging whether negative integer or not rshiftNum uint8 // use to take bit for judging whether negative integer or not
mask uint64 // mask for number mask uint64 // mask for number
indent int // indent number
idx uintptr // offset to access ptr idx uintptr // offset to access ptr
headIdx uintptr // offset to access slice/struct head headIdx uintptr // offset to access slice/struct head

View File

@ -24,15 +24,6 @@ func store(base uintptr, idx uintptr, p uintptr) {
**(**uintptr)(unsafe.Pointer(&addr)) = p **(**uintptr)(unsafe.Pointer(&addr)) = p
} }
func ptrToInt(p uintptr) int { return **(**int)(unsafe.Pointer(&p)) }
func ptrToInt8(p uintptr) int8 { return **(**int8)(unsafe.Pointer(&p)) }
func ptrToInt16(p uintptr) int16 { return **(**int16)(unsafe.Pointer(&p)) }
func ptrToInt32(p uintptr) int32 { return **(**int32)(unsafe.Pointer(&p)) }
func ptrToInt64(p uintptr) int64 { return **(**int64)(unsafe.Pointer(&p)) }
func ptrToUint(p uintptr) uint { return **(**uint)(unsafe.Pointer(&p)) }
func ptrToUint8(p uintptr) uint8 { return **(**uint8)(unsafe.Pointer(&p)) }
func ptrToUint16(p uintptr) uint16 { return **(**uint16)(unsafe.Pointer(&p)) }
func ptrToUint32(p uintptr) uint32 { return **(**uint32)(unsafe.Pointer(&p)) }
func ptrToUint64(p uintptr) uint64 { return **(**uint64)(unsafe.Pointer(&p)) } func ptrToUint64(p uintptr) uint64 { return **(**uint64)(unsafe.Pointer(&p)) }
func ptrToFloat32(p uintptr) float32 { return **(**float32)(unsafe.Pointer(&p)) } func ptrToFloat32(p uintptr) float32 { return **(**float32)(unsafe.Pointer(&p)) }
func ptrToFloat64(p uintptr) float64 { return **(**float64)(unsafe.Pointer(&p)) } func ptrToFloat64(p uintptr) float64 { return **(**float64)(unsafe.Pointer(&p)) }