mirror of
https://github.com/golang/go
synced 2024-11-11 20:20:23 -07:00
bits: use same expression with system bit size
Change-Id: Ibce07f8f36f7c64f7022ce656f8efbec5dff3f82 Reviewed-on: https://go-review.googlesource.com/c/go/+/313829 Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
bc6288794d
commit
d553c0144d
@ -12,7 +12,7 @@ import (
|
||||
// If true, check poset integrity after every mutation
|
||||
var debugPoset = false
|
||||
|
||||
const uintSize = 32 << (^uint(0) >> 32 & 1) // 32 or 64
|
||||
const uintSize = 32 << (^uint(0) >> 63) // 32 or 64
|
||||
|
||||
// bitset is a bit array for dense indexes.
|
||||
type bitset []uint
|
||||
|
@ -8,7 +8,7 @@
|
||||
// functions for the predeclared unsigned integer types.
|
||||
package bits
|
||||
|
||||
const uintSize = 32 << (^uint(0) >> 32 & 1) // 32 or 64
|
||||
const uintSize = 32 << (^uint(0) >> 63) // 32 or 64
|
||||
|
||||
// UintSize is the size of a uint in bits.
|
||||
const UintSize = uintSize
|
||||
|
Loading…
Reference in New Issue
Block a user