You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common pattern in the implementation of the library is that we have two stack variables that represent the same thing but one type is from the sf:: namespace and the other is a CSFML public data type. Having both variables coexist leads to awkward variable names and requires rewriting the same logic to convert one type to another in many places.
I propose we add function overloads that convert between CSFML and SFML data types, in particular conversions from SFML to CSFML types which seems to be a more common.
CSFML/src/SFML/Graphics/RenderWindow.cpp
Lines 194 to 198 in fb9b3ae
A common pattern in the implementation of the library is that we have two stack variables that represent the same thing but one type is from the
sf::
namespace and the other is a CSFML public data type. Having both variables coexist leads to awkward variable names and requires rewriting the same logic to convert one type to another in many places.I propose we add function overloads that convert between CSFML and SFML data types, in particular conversions from SFML to CSFML types which seems to be a more common.
The above snippet from RenderWindow.cpp would become a one-liner.
return toCType(renderWindow->This.getPosition());
The text was updated successfully, but these errors were encountered: