From 78d4955e030ce2d0dd90ee42bf984cdd021b3c1f Mon Sep 17 00:00:00 2001 From: Redstone1024 <2824517378@qq.com> Date: Wed, 18 Dec 2024 21:42:10 +0800 Subject: [PATCH] fix(iterator): fix TCountedIterator not initializing Length --- Redcraft.Utility/Source/Public/Iterator/CountedIterator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Redcraft.Utility/Source/Public/Iterator/CountedIterator.h b/Redcraft.Utility/Source/Public/Iterator/CountedIterator.h index ec5fed9..9296149 100644 --- a/Redcraft.Utility/Source/Public/Iterator/CountedIterator.h +++ b/Redcraft.Utility/Source/Public/Iterator/CountedIterator.h @@ -46,7 +46,7 @@ public: FORCEINLINE constexpr TCountedIterator& operator=(TCountedIterator&&) = default; FORCEINLINE constexpr ~TCountedIterator() = default; - FORCEINLINE constexpr explicit TCountedIterator(FIteratorType InValue, ptrdiff N) : Current(MoveTemp(InValue)) { check_code({ MaxLength = N; }); } + FORCEINLINE constexpr explicit TCountedIterator(FIteratorType InValue, ptrdiff N) : Current(MoveTemp(InValue)), Length(N) { check_code({ MaxLength = N; }); } template requires (!CSameAs && CConstructibleFrom) FORCEINLINE constexpr explicit (!CConvertibleTo) TCountedIterator(const TCountedIterator& InValue)