From 81803c406a82862602aa5e350fcc07692e9f16a6 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 18 Apr 2021 23:28:49 +0200 Subject: Separate handling of modifiers from KeyValue class KeyValue defines an ADT and some of its values, it now contains public final fields and no internal logic. KeyModifier handles modifiers and accents and creates new instances of KeyValue when needed. This operation is now properly cached. --- srcs/juloo.keyboard2/KeyboardData.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'srcs/juloo.keyboard2/KeyboardData.java') diff --git a/srcs/juloo.keyboard2/KeyboardData.java b/srcs/juloo.keyboard2/KeyboardData.java index c137af2..2356954 100644 --- a/srcs/juloo.keyboard2/KeyboardData.java +++ b/srcs/juloo.keyboard2/KeyboardData.java @@ -168,7 +168,7 @@ class KeyboardData public KeyValue map(KeyValue k) { - return (k == null || (k.getFlags() & _flags) != 0) ? null : k; + return (k == null || (k.flags & _flags) != 0) ? null : k; } } @@ -180,7 +180,7 @@ class KeyboardData public KeyValue map(KeyValue k) { - return (k == null || k.getEventCode() == _eventCode) ? null : k; + return (k == null || k.eventCode == _eventCode) ? null : k; } } } -- cgit v1.2.3