Struct: IterSizeHint
struct IterSizeHint;
Hint about minimum and optionally maximum number of items iterator can yield.
See TQuery::SizeHint
.
Example
template <typename I>
void IterCollectIntoArray(I&& Iterator, TArray<typename I::Item>& Result)
{
const auto SizeHint = Iterator.SizeHint();
const auto Capacity = SizeHint.Maximum.IsSet() ? SizeHint.Maximum.GetValue() : SizeHint.Minimum;
Result.Reserve(Result.Num() + Capacity);
while (auto QueryItem = Iterator.Next())
{
Result.Add(QueryItem.GetValue());
}
}
Properties
-
Maximum
public: TOptional<uint32> Maximum;
Maximum number of items iterator can yield.
-
Minimum
public: uint32 Minimum;
Minimum number of items iterator can yield.
Documentation built with Unreal-Doc
v1.0.8 tool by PsichiX