Skip to content

Commit 1f8d6e2

Browse files
authored
More efficient reading of BitSet values with Scala 3
1 parent 7222307 commit 1f8d6e2

File tree

1 file changed

+1
-1
lines changed
  • jsoniter-scala-macros/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/macros

1 file changed

+1
-1
lines changed

jsoniter-scala-macros/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/macros/JsonCodecMaker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2377,7 +2377,7 @@ object JsonCodecMaker {
23772377
if (v < 0 || v >= ${Expr(cfg.bitSetValueLimit)}) $in.decodeError("illegal value for bit set")
23782378
val xi = v >>> 6
23792379
if (xi >= x.length) x = java.util.Arrays.copyOf(x, java.lang.Integer.highestOneBit(xi) << 1)
2380-
x(xi) |= 1L << v
2380+
x(xi) = x(xi) | 1L << v
23812381
$in.isNextToken(',')
23822382
}) ()
23832383
if ($in.isCurrentToken(']')) ${

0 commit comments

Comments
 (0)