This depends on the defaults in TransformStruct, and creates a new one for every iteration, couldn't it be set up just before the loop? (And perhaps have the relevant settings set explicitly).

It's also enough to write TransformStruct temp; (The current code does 2 constructors, and one assignment if I read it right)