From 68370187fafe9c355e489d6976c35cd908f37a00 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 21 Aug 2021 16:50:25 +0700 Subject: [PATCH] math: show value of integer constants in comments Fixes #51282 Change-Id: I5b0d68165b727a427bd4a42663b2fa0070ced22f Reviewed-on: https://go-review.googlesource.com/c/go/+/343990 Run-TryBot: Robert Griesemer Auto-Submit: Robert Griesemer Reviewed-by: Cherry Mui Reviewed-by: Robert Griesemer TryBot-Result: Gopher Robot --- src/math/const.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/math/const.go b/src/math/const.go index 5ea935fb42..b15e50e018 100644 --- a/src/math/const.go +++ b/src/math/const.go @@ -39,19 +39,19 @@ const ( const ( intSize = 32 << (^uint(0) >> 63) // 32 or 64 - MaxInt = 1<<(intSize-1) - 1 - MinInt = -1 << (intSize - 1) - MaxInt8 = 1<<7 - 1 - MinInt8 = -1 << 7 - MaxInt16 = 1<<15 - 1 - MinInt16 = -1 << 15 - MaxInt32 = 1<<31 - 1 - MinInt32 = -1 << 31 - MaxInt64 = 1<<63 - 1 - MinInt64 = -1 << 63 - MaxUint = 1<