SFML/test/Graphics
Chris Thrasher 3f4bb1ae12 Prevent constructing sf::Text with a temporary sf::Font
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>
2023-01-06 10:21:00 -07:00
..
BlendMode.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
CircleShape.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Color.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
ConvexShape.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Drawable.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Font.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Glyph.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Image.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Rect.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
RectangleShape.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
RenderStates.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
RenderTarget.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
RenderTexture.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
RenderWindow.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Shader.test.cpp Added move constructor/operator 2022-11-19 19:52:45 -07:00
Shape.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Sprite.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Text.test.cpp Prevent constructing sf::Text with a temporary sf::Font 2023-01-06 10:21:00 -07:00
Texture.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Transform.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
Transformable.test.cpp Enforce variable case 2022-12-12 16:10:03 -07:00
Vertex.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
VertexArray.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
VertexBuffer.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00
View.test.cpp Rename test files to be unique 2022-10-23 16:39:12 +02:00