Re: Stuck on balls bouncing off walls
Posted: May 8th, 2017, 2:13 am
Yeah, between the : and {} is called the initializer list and when you construct an object, such as a RectF, the memory that is allocated for the object is filled immediately with that data before the function body {} of the constructor is even called, so it's more efficient if you can get away with it.
I might have mentioned all this on the thread I posted, but there are instances where you won't be able to use the initializer list.
I might have mentioned all this on the thread I posted, but there are instances where you won't be able to use the initializer list.