Chris Thrasher
04a7184ab4
Simplify sf::View
construction
2023-12-11 19:33:20 -07:00
Chris Thrasher
e11154e7f7
Define default special member functions in headers
2023-12-10 10:28:42 -07:00
Chris Thrasher
fca84e4011
Implicitly define default constructors
2023-11-20 21:31:40 -07:00
Chris Thrasher
1e4cdf89b6
Use std::array
to reduce code duplication
...
std::array lets us have a single source of truth for array size
rather than needing separate constants or magic numbers that have
to stay in sync with the underlying array.
2023-11-20 12:14:21 -07:00
binary1248
5a2f30c5ae
Added support for scissor testing.
2023-11-20 11:01:33 -07:00
Chris Thrasher
08eca7c9a4
Default all sf::Font
special member functions
2023-11-18 20:52:17 -07:00
Chris Thrasher
ec50a7332b
Fix sf::Rect
docs
2023-11-15 15:58:01 -07:00
Chris Thrasher
d3a79e6282
Add sf::Rect<T>::getCenter()
2023-11-15 09:30:01 -07:00
Chris Thrasher
5cf740fd93
Remove output parameter from sf::Image::saveToMemory
2023-10-28 17:58:21 -06:00
Chris Thrasher
bb1a465e50
Add cppcoreguidelines-pro-type-member-init
clang-tidy check
...
This marks another good step towards systematically rooting out
undefined behavior in the form of reading uninitialized memory.
2023-10-17 21:41:36 -05:00
Chris Thrasher
9dc2e541e8
Add clang-tidy modernize-return-braced-init-list
check
2023-09-17 15:47:33 -06:00
Vittorio Romeo
5cfbf912c7
Do not ignore '[[nodiscard]]` functions in example code
2023-09-13 16:06:23 -06:00
Chris Thrasher
332d11be41
Add move semantics to sf::RenderTarget
and sf::RenderTexture
2023-09-05 17:12:06 -06:00
Chris Thrasher
733a0a8d6d
Let compiler define extra special member functions
2023-08-05 18:58:54 -06:00
kimci86
3d2944998d
Make Text::getFont return a reference
...
because a the m_font pointer cannot be null.
2023-08-05 14:39:07 -06:00
kimci86
623d0f67ea
Make Sprite::getTexture return a reference
...
and do some simplification using the fact that a constructed sprite has
a non-null texture pointer.
2023-08-05 14:39:07 -06:00
Johel Ernesto Guerrero Peña
ac2e4d49cf
docs: add missing braces to initialize vector
2023-07-16 17:43:59 -06:00
Shane Whitmire
b391be2316
Make glyph a struct
...
This glyph class should most definetely be a struct. There aren't any
functions into it. This PR is more of a philosophy question than
anything else. I think we should make an argument for and against here
too.
2023-06-27 12:34:27 +02:00
Chris Thrasher
53e2fab582
Prefer named colors
2023-05-25 17:08:42 -06:00
Chris Thrasher
d131beb0fd
Fix misspellings
...
I used the Python tool codespell to find these
2023-05-21 14:37:46 -06:00
Ted Lyngmo
9855552f64
Add sf::Shape::getGeometricCenter()
...
This adds
virtual Vector2f getGeometricCenter() const = 0;
Signed-off-by: Ted Lyngmo <ted@lyncon.se>
2023-05-15 16:13:39 -06:00
Chris Thrasher
b14d0b47e6
Fix broken sf::swap
overloads
2023-05-13 12:20:44 -06:00
Chris Thrasher
fb1cfdc48d
Add misc-const-correctness
clang-tidy check
2023-05-04 16:22:03 -06:00
Chris Thrasher
29863b14a5
Remove default sf::Sprite
constructor
2023-05-03 13:33:42 -06:00
vittorioromeo
cbfa9cbb65
Reorder includes hierarchically
2023-04-25 17:25:33 +02:00
Chris Thrasher
97c00d42ad
Enable clang-tidy modernize-pass-by-value
check
2023-04-24 15:12:53 +02:00
vittorioromeo
230c6a4d57
Simplify 'FontHandles' management
2023-04-19 16:32:49 +01:00
Chris Thrasher
2c99b3343a
Remove default sf::Text
constructor
2023-04-05 09:54:56 -06:00
Jim-Marsden
a8bc8cf889
Added move constructor, and move assignment operator.
2023-03-29 23:48:05 +02:00
binary1248
f4e0c4b4c0
Make moving Shapes, swapping Textures and swapping VertexBuffers noexcept.
2023-03-07 16:32:35 -07:00
metaquarx
474de4d16e
Allow setting window icon with sf::Image
2023-02-21 15:48:33 -07:00
Vittorio Romeo
698b7ee49f
Remove unused headers and reduce physical dependencies
2023-02-20 23:30:25 +01:00
Chris Thrasher
5bd3722598
Fix sf::Rect
docs
2023-02-19 17:40:03 -07:00
Norm Evangelista
4c8b770992
Replaced anonymous enums with constexpr per #2328
...
Addressed review comments
Addressed review comments
Changed NOLINTBEGIN/END to NOLINTNEXTLINE
Addressed CI complaint
Fixed BSD CI issues
2023-01-24 16:15:16 -07:00
Norm Evangelista
6ef8e487cc
Added readability-qualified-auto, -redundant-access-specifiers
...
Fixed clang-format escapes
Fixed OSX clang-tidy issues
Collapsed extraneous lines
Fixed clang-format escape
2023-01-19 15:53:40 -07:00
Chris Thrasher
8a5b206bb8
Add clang-tidy modernize-use-default-member-init check
2023-01-18 08:03:10 -07:00
Nikita
1f0167192b
Update to year 2023
2023-01-12 11:38:41 +01:00
Chris Thrasher
badb388507
Remove unnecessary casts
2023-01-11 15:30:22 -07:00
Chris Thrasher
2d0c923a53
Prevent using a temporary sf::Texture
with sf::Shader
2023-01-06 15:46:22 -07:00
Chris Thrasher
0c2f7da9f9
Prevent using a temporary sf::Texture
with sf::Sprite
2023-01-06 15:46:22 -07:00
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
Chris Thrasher
9a4426fb35
Simplify in-class initializer expressions
2023-01-03 14:51:44 -07:00
Chris Thrasher
15cdb40fc2
Merge branch '2.6.x' into feature/backmerge
2022-12-29 22:48:49 -07:00
kimci86
f0b44937ce
Update Image documentation regarding supported input formats
2022-12-29 00:08:52 +01:00
Jim-Marsden
7884efc49e
Replaced Header Guards with Pragma Once
2022-12-27 20:08:11 +01:00
Benjamin Li
9c7b7d68c0
Use = default to define empty destructors #2311
2022-12-27 11:08:11 +01:00
Chris Thrasher
b7198b08d6
Use in-class member initializers
2022-12-18 09:11:22 -07:00
Jim-Marsden
487c97afaf
Added non-trivial move operations.
...
Removed the default move constructor and operator.
2022-12-15 10:03:54 -07:00
Chris Thrasher
3b6db4d18c
Enforce variable case
2022-12-12 16:10:03 -07:00
fuzzdistor
7faa5507a4
Rearanged members of Transformable for a smaller object size
2022-11-29 01:28:05 -07:00