File tree Expand file tree Collapse file tree 1 file changed +16
-22
lines changed
jsoniter-scala-core/js/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core Expand file tree Collapse file tree 1 file changed +16
-22
lines changed Original file line number Diff line number Diff line change @@ -1980,14 +1980,12 @@ final class JsonWriter private[jsoniter_scala](
1980
1980
var q0 = x
1981
1981
if (x < 0 ) {
1982
1982
q0 = - q0
1983
- if (q0 != x) {
1984
- buf(pos) = '-'
1985
- pos += 1
1986
- } else {
1983
+ buf(pos) = '-'
1984
+ pos += 1
1985
+ if (q0 == x) {
1987
1986
q0 = 147483648
1988
- buf(pos) = '-'
1989
- buf(pos + 1 ) = '2'
1990
- pos += 2
1987
+ buf(pos) = '2'
1988
+ pos += 1
1991
1989
}
1992
1990
}
1993
1991
pos += digitCount(q0)
@@ -2249,14 +2247,12 @@ final class JsonWriter private[jsoniter_scala](
2249
2247
var q0 = x
2250
2248
if (x < 0 ) {
2251
2249
q0 = - q0
2252
- if (q0 != x) {
2253
- buf(pos) = '-'
2254
- pos += 1
2255
- } else {
2250
+ buf(pos) = '-'
2251
+ pos += 1
2252
+ if (q0 == x) {
2256
2253
q0 = 147483648
2257
- buf(pos) = '-'
2258
- buf(pos + 1 ) = '2'
2259
- pos += 2
2254
+ buf(pos) = '2'
2255
+ pos += 1
2260
2256
}
2261
2257
}
2262
2258
pos += digitCount(q0)
@@ -2273,16 +2269,14 @@ final class JsonWriter private[jsoniter_scala](
2273
2269
var q0 = x
2274
2270
if (x < 0 ) {
2275
2271
q0 = - q0
2276
- if (q0 != x) {
2277
- buf(pos) = '-'
2278
- pos += 1
2279
- } else {
2272
+ buf(pos) = '-'
2273
+ pos += 1
2274
+ if (q0 == x) {
2280
2275
q0 = 3372036854775808L
2281
- buf(pos) = '- '
2282
- buf(pos + 1 ) = '9 '
2276
+ buf(pos) = '9 '
2277
+ buf(pos + 1 ) = '2 '
2283
2278
buf(pos + 2 ) = '2'
2284
- buf(pos + 3 ) = '2'
2285
- pos += 4
2279
+ pos += 3
2286
2280
}
2287
2281
}
2288
2282
var q = q0.toInt
You can’t perform that action at this time.
0 commit comments