mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
3f4bb1ae12
By deleting this constructor overload, it fails to compile if you pass a temporary font to this parameter slot. That includes code like sf::Text text("", sf::Font()); but more importantly it prohibits code like this sf::Font getFont() { sf::Font font; // load a font... return font; } sf::Text text("", getFont()); The same idea can be applied to setFont() to prevent setting fonts from a temporary. Credit to Jonny for the idea Co-authored-by: JonnyPtn <jonathan.r.paton@googlemail.com> |
||
---|---|---|
.. | ||
SFML |