'auto' keyword

Currently on #218, Ben is using the ‘auto’ keyword a lot when initializing variables, my understanding is that (even though either will work) the type should be explicit unless it’s an iterator variable, or if the type can’t easily be discerned.

auto OurTankName = GetOwner()->GetName();
auto BarrelLocation = Barrel->GetComponentLocation().ToString();

vs

FString OurTankName = GetOwner()->GetName();
FString BarrelLocation = Barrel->GetComponentLocation().ToString();

Is there something I’m missing, or is the standard for using the auto keyword newer than when the course was created?

Ben just didn’t adhere to it :man_shrugging:.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms