fix(range): fix GetBase() of sentinel adapters such as TFilterView's

This commit is contained in:
Redstone1024 2024-12-18 21:45:25 +08:00
parent 78d4955e03
commit 85199119b3
3 changed files with 3 additions and 6 deletions

View File

@ -136,8 +136,7 @@ private:
NODISCARD FORCEINLINE constexpr bool operator==(const FIteratorImpl& InValue) const& { return Current == InValue.Current; }
NODISCARD FORCEINLINE constexpr const TRangeSentinel<V>& GetBase() const& { return Current; }
NODISCARD FORCEINLINE constexpr TRangeSentinel<V> GetBase() && { return MoveTemp(Current); }
NODISCARD FORCEINLINE constexpr TRangeSentinel<V> GetBase() const { return Current; }
private:

View File

@ -126,8 +126,7 @@ private:
return InValue.Num() == 0 || InValue.GetBase() == Current;
}
NODISCARD FORCEINLINE constexpr const TRangeIterator<FBase>& GetBase() const& { return Current; }
NODISCARD FORCEINLINE constexpr TRangeIterator<FBase> GetBase() && { return MoveTemp(Current); }
NODISCARD FORCEINLINE constexpr TRangeSentinel<FBase> GetBase() const { return Current; }
private:

View File

@ -178,8 +178,7 @@ private:
return RHS.GetBase() - LHS.GetBase();
}
NODISCARD FORCEINLINE constexpr const TRangeIterator<FBase>& GetBase() const& { return Current; }
NODISCARD FORCEINLINE constexpr TRangeIterator<FBase> GetBase() && { return MoveTemp(Current); }
NODISCARD FORCEINLINE constexpr TRangeSentinel<FBase> GetBase() const { return Current; }
private: