Skip to content

Commit 3c33c3b

Browse files
cuishuanggopherbot
authored andcommitted
strconv: remove redundant type conversion
Change-Id: I25c8e8b701d6489f360fea30d09090826276b950 GitHub-Last-Rev: c2c8319 GitHub-Pull-Request: #54924 Reviewed-on: https://go-review.googlesource.com/c/go/+/428976 Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Run-TryBot: Daniel Martí <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
1 parent 3585e9b commit 3c33c3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/strconv/ftoaryu.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func ryuFtoaFixed32(d *decimalSlice, mant uint32, exp int, prec int) {
3333
e2 := exp
3434
if b := bits.Len32(mant); b < 25 {
3535
mant <<= uint(25 - b)
36-
e2 += int(b) - 25
36+
e2 += b - 25
3737
}
3838
// Choose an exponent such that rounded mant*(2^e2)*(10^q) has
3939
// at least prec decimal digits, i.e
@@ -100,7 +100,7 @@ func ryuFtoaFixed64(d *decimalSlice, mant uint64, exp int, prec int) {
100100
e2 := exp
101101
if b := bits.Len64(mant); b < 55 {
102102
mant = mant << uint(55-b)
103-
e2 += int(b) - 55
103+
e2 += b - 55
104104
}
105105
// Choose an exponent such that rounded mant*(2^e2)*(10^q) has
106106
// at least prec decimal digits, i.e
@@ -194,7 +194,7 @@ func formatDecimal(d *decimalSlice, m uint64, trunc bool, roundUp bool, prec int
194194
}
195195
// render digits (similar to formatBits)
196196
n := uint(prec)
197-
d.nd = int(prec)
197+
d.nd = prec
198198
v := m
199199
for v >= 100 {
200200
var v1, v2 uint64

0 commit comments

Comments
 (0)