diff options
author | Ian Lance Taylor <iant@golang.org> | 2024-04-14 11:06:46 -0700 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2024-04-19 18:02:47 +0000 |
commit | 903e0ffbed56df8d3c753b27d6bdedbd0fc614dc (patch) | |
tree | ece1aead763deff26c8266d3a87d3d5ae780e3b4 | |
parent | 35c619398b976bf90fb8c813653cf48ce732b032 (diff) | |
download | go-903e0ffbed56df8d3c753b27d6bdedbd0fc614dc.tar.gz go-903e0ffbed56df8d3c753b27d6bdedbd0fc614dc.zip |
reflect: remove unnecessary type conversions of untyped PtrSize
Change-Id: I0f20020c2929b58958ce228b9f175d5b4fd77a1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/578855
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
-rw-r--r-- | src/reflect/type.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflect/type.go b/src/reflect/type.go index cfefb4c27c..3095dfea48 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -2936,14 +2936,14 @@ func addTypeBits(bv *bitVector, offset uintptr, t *abi.Type) { switch Kind(t.Kind_ & abi.KindMask) { case Chan, Func, Map, Pointer, Slice, String, UnsafePointer: // 1 pointer at start of representation - for bv.n < uint32(offset/uintptr(goarch.PtrSize)) { + for bv.n < uint32(offset/goarch.PtrSize) { bv.append(0) } bv.append(1) case Interface: // 2 pointers - for bv.n < uint32(offset/uintptr(goarch.PtrSize)) { + for bv.n < uint32(offset/goarch.PtrSize) { bv.append(0) } bv.append(1) |