1
General discussions / Design and documentation
« on: December 30, 2009, 09:35:12 pm »
First of all, why are so many things assigned by value (like shapes, it seems)?
And second, why are things that look like they are assigned by value, assigned by pointer? This is what I'm talking about:
I wasted so much time trying to figure out why this didn't work, knowing that SetView() took a constant reference, and therefore assuming it wouldn't store my object:
The next to useless documentation doesn't really help in this regard, either...
And second, why are things that look like they are assigned by value, assigned by pointer? This is what I'm talking about:
Code: [Select]
void RenderTarget::SetView(const View& NewView)
{
myCurrentView = &NewView;
}
I wasted so much time trying to figure out why this didn't work, knowing that SetView() took a constant reference, and therefore assuming it wouldn't store my object:
Code: [Select]
sf::View view; /* use view */
myRt.SetView(view); // wtf, changes don't seem to have any effect
The next to useless documentation doesn't really help in this regard, either...