Skip to content

Commit

Permalink
clean readPositiveFloat64
Browse files Browse the repository at this point in the history
  • Loading branch information
dvrkps committed Jan 10, 2019
1 parent 16aef10 commit 3a023a5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions iter_float.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,12 @@ func (iter *Iterator) ReadFloat64() (ret float64) {
}

func (iter *Iterator) readPositiveFloat64() (ret float64) {
value := uint64(0)
c := byte(' ')
i := iter.head
// first char
if i == iter.tail {
return iter.readFloat64SlowPath()
}
c = iter.buf[i]
c := iter.buf[i]
i++
ind := floatDigits[c]
switch ind {
Expand All @@ -244,7 +242,7 @@ func (iter *Iterator) readPositiveFloat64() (ret float64) {
return
}
}
value = uint64(ind)
value := uint64(ind)
// chars before dot
non_decimal_loop:
for ; i < iter.tail; i++ {
Expand Down

0 comments on commit 3a023a5

Please sign in to comment.