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> |
||
---|---|---|
.. | ||
BlendMode.test.cpp | ||
CircleShape.test.cpp | ||
Color.test.cpp | ||
ConvexShape.test.cpp | ||
Drawable.test.cpp | ||
Font.test.cpp | ||
Glyph.test.cpp | ||
Image.test.cpp | ||
Rect.test.cpp | ||
RectangleShape.test.cpp | ||
RenderStates.test.cpp | ||
RenderTarget.test.cpp | ||
RenderTexture.test.cpp | ||
RenderWindow.test.cpp | ||
Shader.test.cpp | ||
Shape.test.cpp | ||
Sprite.test.cpp | ||
Text.test.cpp | ||
Texture.test.cpp | ||
Transform.test.cpp | ||
Transformable.test.cpp | ||
Vertex.test.cpp | ||
VertexArray.test.cpp | ||
VertexBuffer.test.cpp | ||
View.test.cpp |