diff --git a/dec_int.go b/dec_int.go index 64eab15..f9d351f 100644 --- a/dec_int.go +++ b/dec_int.go @@ -8,13 +8,14 @@ import ( "github.com/go-faster/errors" ) -var intDigits []int8 +var intDigits [256]int8 -const uint32SafeToMultiply10 = uint32(0xffffffff)/10 - 1 -const uint64SafeToMultiple10 = uint64(0xffffffffffffffff)/10 - 1 +const ( + uint32SafeToMultiply10 = uint32(0xffffffff)/10 - 1 + uint64SafeToMultiple10 = uint64(0xffffffffffffffff)/10 - 1 +) func init() { - intDigits = make([]int8, 256) for i := 0; i < len(intDigits); i++ { intDigits[i] = invalidCharForNumber }