Skip to content

Commit

Permalink
reduce enum array allocation (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis authored Apr 24, 2024
1 parent cd3aafc commit 5db4b28
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ protected final char readNextNonWhitespaceChar(char c) {

@Override
public Event currentEvent() {
return previousEvent >= 0 && previousEvent < Event.values().length
? Event.values()[previousEvent]
return previousEvent >= 0 && previousEvent < EVT_MAP.length
? EVT_MAP[previousEvent]
: null;
}

Expand Down

0 comments on commit 5db4b28

Please sign in to comment.