Skip to content

Commit 16aef10

Browse files
committed
clean readPositiveFloat32
1 parent ae4c002 commit 16aef10

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

iter_float.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,12 @@ func (iter *Iterator) ReadFloat32() (ret float32) {
7777
}
7878

7979
func (iter *Iterator) readPositiveFloat32() (ret float32) {
80-
value := uint64(0)
81-
c := byte(' ')
8280
i := iter.head
8381
// first char
8482
if i == iter.tail {
8583
return iter.readFloat32SlowPath()
8684
}
87-
c = iter.buf[i]
85+
c := iter.buf[i]
8886
i++
8987
ind := floatDigits[c]
9088
switch ind {
@@ -107,7 +105,7 @@ func (iter *Iterator) readPositiveFloat32() (ret float32) {
107105
return
108106
}
109107
}
110-
value = uint64(ind)
108+
value := uint64(ind)
111109
// chars before dot
112110
non_decimal_loop:
113111
for ; i < iter.tail; i++ {

0 commit comments

Comments
 (0)