bool UInventorySystems::AreEmptySlotsLeft(UPARAM(ref) const TArray<FItemSlotData>& Inventory)
{
for (FItemSlotData Slot : Inventory)
{
if (Slot.ItemAmounts == 0) return true;
}
return false;
}
ㅇㅇ
TArray가 벡터같은건데 어떻게하면 반복자 좆까고 저렇게 할수있냐
bool UInventorySystems::AreEmptySlotsLeft(UPARAM(ref) const TArray<FItemSlotData>& Inventory)
{
for (FItemSlotData Slot : Inventory)
{
if (Slot.ItemAmounts == 0) return true;
}
return false;
}
ㅇㅇ
TArray가 벡터같은건데 어떻게하면 반복자 좆까고 저렇게 할수있냐
아쉽지만 안돼.
c++의 세계적 권위자가 되어 표준위원회에 들어가서 표준을 바꾸는 방법이 있긴 하다
안된다고? 에픽 미친놈들 어떻게한거지
아 표준 갖다버리고 마개조한건가
foreach는 begin과 end를 구현하면 쓸수 있음
인벤토리에 비긴 엔드 있으면 range based for 가능ㅇㅇ
저 경우에는 auto& 로 받는게 맞다 - dc App