glfw: Replace the pointer size calc with bits.UintSize / 8

Updates #1306
This commit is contained in:
Hajime Hoshi 2020-09-04 01:18:37 +09:00
parent ee15e06c50
commit 760225df75

View File

@ -17,6 +17,7 @@ package glfw
import ( import (
"image" "image"
"image/draw" "image/draw"
"math/bits"
"runtime" "runtime"
"sync" "sync"
"unsafe" "unsafe"
@ -384,7 +385,7 @@ func GetMonitors() []*Monitor {
if m != nil { if m != nil {
ms[i] = &Monitor{uintptr(m)} ms[i] = &Monitor{uintptr(m)}
} }
ptr += unsafe.Sizeof(unsafe.Pointer(uintptr(0))) ptr += bits.UintSize / 8
} }
return ms return ms
} }