Let's consider these two ways of passing an obj to a function:
//var is a structured obj (1) do ..methodX(var) (2) do ..methodX(.var)
In c++ if we pass an obj by reference like in (2) we save a lot in computation because we are not copying the whole object, and when the object is modified within the function it is modified also for everyone.
In this case does (2) achieve any better performance than (1)? Is passing with the "." save any computation? the object is copied anyway?
Is there a simple way of passing obj to a function?