Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - nullsquared

Pages: [1]
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:
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...

Pages: [1]