You are creating copies when you do that.
You should only loop by value when it’s primitive types like int, float, size_t;
For compound types use immutable labels:
for (const FInventoryItem &Item : InputArray) {
You are creating copies when you do that.
You should only loop by value when it’s primitive types like int, float, size_t;
For compound types use immutable labels:
for (const FInventoryItem &Item : InputArray) {