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
Jonny
510068d501
Use enum class instead of plain enum for PrimitiveType ( #2286 )
...
Co-authored-by: Jean Tampon <jean.tampon@gmail.com>
2022-11-27 12:17:27 -07:00
Christian Ivicevic
a9f33999dc
Fix outdated use of the sf::VideoMode constructor
2022-11-22 14:55:52 +01:00
jim
1d4db22d62
Added move constructor/operator
2022-11-19 19:52:45 -07:00
Chris Thrasher
6451a29f49
Disable certain GCC pragmas when using other compilers
...
Fixes MSVC warning C4068 in public headers while keeping that warning
disabled for uses of GCC pragmas in SFML source files.
2022-11-05 12:52:40 -06:00
Chris Thrasher
cd985e37d2
Enforce parameter case
2022-10-24 12:53:29 +02:00
Chris Thrasher
3a3935d005
Replace sf::Uint64
with std::uint64_t
2022-09-13 11:15:03 -06:00
Chris Thrasher
e294090c8e
Replace sf::Uint32
with std::uint32_t
2022-09-12 15:36:55 -06:00
Chris Thrasher
ff9c9131b3
Replace sf::Uint16
with std::uint16_t
2022-09-12 21:36:13 +03:00
Chris Thrasher
e2528de20a
Replace sf::Uint8
with std::uint8_t
2022-09-09 10:28:53 +02:00
Chris Thrasher
4f52793f7d
Run clang-format
2022-07-11 20:04:56 +02:00