Download

TArray initialization with constructor

So I have a GetBestItem(TArray<ADHUsableItem*> Excluded) function

And in order to call it to exclude CurrentItem, I need to do this:


TArray<ADHUsableItem*> Excluded;
Excluded.Init(CurrentItem, 1);
EquipItem(GetBestItem(Excluded));

But is there a way to initialize a TArray with constructor so that code can be reduced to 1 line?