diff options
author | isXander <xandersmith2008@gmail.com> | 2023-05-21 14:38:00 +0100 |
---|---|---|
committer | isXander <xandersmith2008@gmail.com> | 2023-05-21 14:38:00 +0100 |
commit | 590e69f4bf445a39737b0b1552cf116ff780d75e (patch) | |
tree | ab3915921839b15829e6c02232dc02f73ec027fa /common/src/main/java/dev/isxander/yacl/impl/OptionImpl.java | |
parent | c84415116455d108ad07fc8dd6232c9acc94c40f (diff) | |
download | YetAnotherConfigLib-590e69f4bf445a39737b0b1552cf116ff780d75e.tar.gz YetAnotherConfigLib-590e69f4bf445a39737b0b1552cf116ff780d75e.tar.bz2 YetAnotherConfigLib-590e69f4bf445a39737b0b1552cf116ff780d75e.zip |
Cache image renderers for whole game's lifecycle
Diffstat (limited to 'common/src/main/java/dev/isxander/yacl/impl/OptionImpl.java')
-rw-r--r-- | common/src/main/java/dev/isxander/yacl/impl/OptionImpl.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/src/main/java/dev/isxander/yacl/impl/OptionImpl.java b/common/src/main/java/dev/isxander/yacl/impl/OptionImpl.java index ef4d13b..27f43b8 100644 --- a/common/src/main/java/dev/isxander/yacl/impl/OptionImpl.java +++ b/common/src/main/java/dev/isxander/yacl/impl/OptionImpl.java @@ -52,8 +52,7 @@ public final class OptionImpl<T> implements Option<T> { this.listeners = new ArrayList<>(listeners); this.controller = controlGetter.apply(this); - var memoizedDescriptionFunction = Util.memoize(descriptionFunction); - addListener((opt, pending) -> description = memoizedDescriptionFunction.apply(pending)); + addListener((opt, pending) -> description = descriptionFunction.apply(pending)); requestSet(binding().getValue()); } |