Shape::Line(...), Shape::Rectangle(...), and so on, return a Shape by value. I don't even see a copy constructor for Shape or Drawable, what in the world is going on?
Of course they do. Do you suggest that they should allocate a new instance with
new, and leave the caller with a pointer and the obligation to call
delete?
Shape and Drawable only have trivial members, thus the default generated copy constructor is enough, I don't need to define a custom one.
It's quite widely accepted to use const references as parameters in functions to avoid extra copies. For example, Drawable::SetPosition() accepts a const reference to avoid copying the vector parameter. However, by your (or SFML's) "code style", I would have to double check this myself just in case SFML decides to store a pointer to my position, instead of updating its own internal position (which is what happens with SetView()).
I disagree. I use references to tell the caller "hey, you don't have the option to pass a NULL value that would do some special stuff, just pass a valid object". The only thing to do to make this clear is to have a good documentation. I agree that it is poor in SFML 1.x, but it will be much much better in SFML 2.
There are two solutions: use a pointer (which makes it obvious that the intent is to store the parameter), or use a non-const reference (which makes it obvious that the intent is to modify the parameter, and therefore allow storing).
Non-const reference means that the object will be modified, which is false here. When you pass a view to a render-window, you know that it won't be changed by it, because of the const reference. With a non-const reference, anything could happen and you can't assume that your view won't suddenly change.
const_cast is almost always a cause for concern about the design. Why is the View getting passed around by const reference if it's only going to const_cast itself into a non-const View?!?
In graphics programming, const_cast are not a design issue. It's an optimization technique called "lazy evaluation", ie. things are computed and updated only when you request them. In a perfect world, I would compute the view's rectangle after a call to any setter, and leave GetRect() const. But that's inefficient. I use the same technique in other classes where performances matters.
I think that the only real problem is the documentation, and like I said it will be fixed in SFML 2
I already updated the system, window and audio modules, and some classes of the graphics module.