Skip to content

Commit 3a023a5

Browse files
committed
clean readPositiveFloat64
1 parent 16aef10 commit 3a023a5

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
@@ -214,14 +214,12 @@ func (iter *Iterator) ReadFloat64() (ret float64) {
214214
}
215215

216216
func (iter *Iterator) readPositiveFloat64() (ret float64) {
217-
value := uint64(0)
218-
c := byte(' ')
219217
i := iter.head
220218
// first char
221219
if i == iter.tail {
222220
return iter.readFloat64SlowPath()
223221
}
224-
c = iter.buf[i]
222+
c := iter.buf[i]
225223
i++
226224
ind := floatDigits[c]
227225
switch ind {
@@ -244,7 +242,7 @@ func (iter *Iterator) readPositiveFloat64() (ret float64) {
244242
return
245243
}
246244
}
247-
value = uint64(ind)
245+
value := uint64(ind)
248246
// chars before dot
249247
non_decimal_loop:
250248
for ; i < iter.tail; i++ {

0 commit comments

Comments
 (0)