From 85d230c561395447e501aa8766778c3cbb326917 Mon Sep 17 00:00:00 2001 From: Speiger Date: Tue, 4 Jul 2023 17:29:32 +0200 Subject: [PATCH] Fixed a auto generation bug where iterators wouldn't accept settings --- .../assets/collections/templates/utils/Iterables.template | 3 +++ .../assets/collections/templates/utils/Iterators.template | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/builder/resources/speiger/assets/collections/templates/utils/Iterables.template b/src/builder/resources/speiger/assets/collections/templates/utils/Iterables.template index d7b6c64..27ffc7e 100644 --- a/src/builder/resources/speiger/assets/collections/templates/utils/Iterables.template +++ b/src/builder/resources/speiger/assets/collections/templates/utils/Iterables.template @@ -342,6 +342,8 @@ public class ITERABLES #argument MAPPER Predicate ToByteFunction ToShortFunction ToIntFunction ToLongFunction ToFloatFunction ToDoubleFunction #argument APPLY test applyAsByte applyAsShort applyAsInt applyAsLong applyAsFloat applyAsDouble #argument DATA_TYPE Boolean Byte Short Int Long Float Double +#argument FILTER_TYPE BOOLEAN_COLLECTION_MODULE BYTE_COLLECTION_MODULE SHORT_COLLECTION_MODULE INT_COLLECTION_MODULE LONG_COLLECTION_MODULE FLOAT_COLLECTION_MODULE DOUBLE_COLLECTION_MODULE +#if FILTER_TYPE private static class MAPPED_TYPEIterable implements OUTPUT_ITERABLE, ISizeProvider { ITERABLE KEY_SPECIAL_GENERIC_TYPE iterable; @@ -369,6 +371,7 @@ public class ITERABLES } } +#endif #enditerate #endif private static class MappedIterable KSS_GENERIC_TYPE implements ObjectIterable, ISizeProvider diff --git a/src/builder/resources/speiger/assets/collections/templates/utils/Iterators.template b/src/builder/resources/speiger/assets/collections/templates/utils/Iterators.template index dc71c85..0623006 100644 --- a/src/builder/resources/speiger/assets/collections/templates/utils/Iterators.template +++ b/src/builder/resources/speiger/assets/collections/templates/utils/Iterators.template @@ -925,6 +925,8 @@ public class ITERATORS #argument MAPPER Predicate ToByteFunction ToShortFunction ToIntFunction ToLongFunction ToFloatFunction ToDoubleFunction #argument APPLY test applyAsByte applyAsShort applyAsInt applyAsLong applyAsFloat applyAsDouble #argument DATA_TYPE boolean byte short int long float double +#argument FILTER_TYPE BOOLEAN_COLLECTION_MODULE BYTE_COLLECTION_MODULE SHORT_COLLECTION_MODULE INT_COLLECTION_MODULE LONG_COLLECTION_MODULE FLOAT_COLLECTION_MODULE DOUBLE_COLLECTION_MODULE +#if FILTER_TYPE private static class MAPPED_TYPEIterator implements OUTPUT_ITERATOR { ITERATOR iterator; @@ -951,6 +953,7 @@ public class ITERATORS } } +#endif #enditerate #endif private static class FlatMappedIterator KSS_GENERIC_TYPE> implements ObjectIterator