Commit Graph

1477 Commits

Author SHA1 Message Date
Chris Thrasher
0812054e02 Remove trailing whitespace 2022-06-25 21:32:55 +02:00
Vittorio Romeo
8a2aa6397f Explicitly instantiate float vector members in cpp 2022-06-24 18:47:28 +02:00
Chris Thrasher
d7f09c1167 Manually inline sf::IpAddress::resolve
This code is better expressed as a constructor since that's the
only place where it's used.
2022-06-23 20:22:13 +02:00
Chris Thrasher
76223b07a1 Implement sf::IpAddress with std::optional 2022-06-23 20:22:13 +02:00
Vittorio Romeo
e4c5af63b7 Replace 'TcpSocket::send' local buffer with data member 2022-06-23 18:37:01 +02:00
kimci86
c4790bcb14 Clarify Image::copy implementation 2022-06-23 18:03:54 +02:00
Vittorio Romeo
6cd07a043f 'sf::Image::copy' returns a 'bool' to signal success/failure 2022-06-21 16:40:22 +02:00
Bambo-Borris
91c4a451ef Fix out of bounds read for sf::Image::copy() with bad sourceRect 2022-06-21 15:14:27 +02:00
Chris Thrasher
27a7774786 Use = default for trivial virtual destructors 2022-06-13 12:01:37 +02:00
Chris Thrasher
e61a8c5c1b Remove empty non-virtual destructors
While this practice didn't matter too much in C++03, it becomes a
pessimization with the introduction of C++11 move semantics. When
a destructor is defined, no matter how trivial it is, it implicitly
disables move semantics. Because the compiler can sometimes move
objects without the programmer asking, the inability to make these
moves can unnecessarily slow down SFML programs. Removing these
trivial destructors is an easy way to enable move semantics for
more SFML types and quietly speed up everyone's code.
2022-06-13 12:01:37 +02:00
Bård Sigurd Møller
709530d062 SFML/Graphics/Text.cpp: Compare utf32-characters to utf32 character literals consistently 2022-06-10 14:15:13 +02:00
Vittorio Romeo
fd1435d1c0 Prevent more conflicts between the 'None' Xlib macro and 'WindowStyle::None' 2022-06-08 13:44:16 +02:00
Chris Thrasher
745bcb82ef Remove implicitly defined special member functions 2022-06-07 23:19:30 +02:00
Lukas Dürrenberger
864f0feedd
Merge pull request #2112 from SFML/2.6.x
Merge 2.6.x to master
2022-06-03 17:59:50 +02:00
Vittorio Romeo
29f364eafa Include '<utility>' for 'std::exchange' 2022-06-03 17:57:42 +02:00
Lukas Dürrenberger
417f003224 Merge branch '2.6.x' 2022-06-03 17:08:06 +02:00
DanielRabl
97a1bf2f5d Use wide-string character consistently
Comparing '\r' against 8bit character instead of 16bit wide character.
2022-06-02 16:09:33 +02:00
Chris Thrasher
e1f36e66a5 Reduce casts to (void) 2022-06-01 08:19:40 +02:00
Chris Thrasher
b71ff372c7 Use () for functions with no parameters 2022-06-01 08:19:40 +02:00
Chris Thrasher
e0c4d14541 Use [[maybe_unused]] for parameters that are sometimes not used
Depending on preprocessor settings, certain parameters may or may
not be used. Instead of casing to (void) when not used, it's easier
to use C++17's [[maybe_unused]] attribute to express this.
2022-06-01 08:19:40 +02:00
Andrew King
3e424550d8 Added comment for GCC 12.1 false-positive (issue #2100) 2022-05-26 00:03:07 +02:00
Andrew King
6ff85eebe5 bugfix for #2100: null-dereference in GCC 12.1.0 2022-05-26 00:03:07 +02:00
Chris Thrasher
88515b2fca Add polar coordinates constructor for sf::Vector2<T> 2022-05-17 20:30:02 +02:00
Chris Thrasher
0785093ebc Use sf::Vector2<T> for numeric parameter pairs 2022-05-17 08:33:11 +02:00
Lukas Dürrenberger
65e357e901
Merge pull request #2099 from SFML/2.6.x
Backmerge 2.6.x to master
2022-05-10 23:39:34 +02:00
kimci86
9842c8fdf8 Fix incorrect cast when loading 16-bit samples from WAV file 2022-05-06 21:07:42 +02:00
Coder-Rahul-Y
9d401398e7 replacing NULL with nullptr in src/window file 2022-05-05 00:03:00 +02:00
CosminPerRam
6b4c287c20 Fixed unnecessary instantiation
Co-authored-by: kimci86 <kimci86@hotmail.fr>
2022-05-05 00:00:35 +02:00
CosminPerRam
27a82e733b try_emplace in Font::loadPage 2022-05-05 00:00:35 +02:00
Chris Thrasher
f320fc0db4 Remove local variables that shadowed global 2022-05-02 08:39:02 +02:00
Lukas Dürrenberger
9a6142bd22 Merge branch '2.6.x' 2022-04-27 08:12:25 +02:00
Radek Dutkiewicz
b6ca47e128 DRM Implementation
Ported sfml-pi DRM/KMS backend written by @mickelson 
Port co-authored by @substring

Co-authored-by: Andrew Mickelson <andrew.mickelson@gmail.com>
Co-authored-by: Gil Delescluse <frog2wah@gmail.com>
2022-04-26 07:44:14 +02:00
Lukas Dürrenberger
af209510d9 Merge branch '2.6.x' into master 2022-04-21 08:31:37 +02:00
kimci86
f7c88ee7ef Fix font pages not being created with the desired smoothness 2022-04-21 08:24:40 +02:00
Peter Chapman
470822cfe4 Fixed incorrect value for fully transparent pixels 2022-04-21 08:23:10 +02:00
Chris Thrasher
f8c1ec283a Print absolute paths when file not found
This is helpful when debugging why files won't load. By printing
the whole path we're making it more clear to the user exactly what
file is failing to load.
2022-04-21 08:22:19 +02:00
kimci86
28279c0686 Fix incorrect cast in Cursor::loadFromPixels Unix implementation 2022-04-13 08:49:20 +02:00
Chris Thrasher
92ece7dcc3 Remove iOS 7 workarounds 2022-04-12 08:13:18 +02:00
Lukas Dürrenberger
cb675b2bbc Merge branch '2.6.x' into feature/back-merge 2022-04-07 08:57:06 +02:00
binary1248
4afa91422f Added back the missing WINAPI calling convention declaration that was left out in 9a0cc4b7dc. Closes #2057. 2022-04-07 08:48:17 +02:00
kimci86
fae91bbbf2 Allow SoundStream::play to be called again after reaching the end 2022-04-06 12:01:42 +02:00
binary1248
8e95d1c73a Abort looping in SoundStream::streamData if an OpenAL error occurs that would have caused it to never terminate. Fixes #1831 2022-04-06 11:50:17 +02:00
Chris Thrasher
c5f3aeca72 Use std::quoted 2022-04-05 22:45:22 +02:00
Chris Thrasher
8f6903d008 Remove empty file 2022-03-25 17:03:46 +01:00
Vittorio Romeo
8838030d67 Fix -Wmissing-braces warning under clang 2022-03-18 08:34:41 +01:00
Chris Thrasher
d64cbff463 Remove redundant quotes when printing filesystem paths
operator<< for std::filesystem::path already adds quotes around the
path so we don't need to keep manually quoting them.
2022-03-15 15:21:45 +01:00
marwen.azouzi
79250d9584 Fixes the following compilation error
error: implicit conversion from 'size_t' (aka 'unsigned long') to 'CGFloat' (aka 'double') may lose precision [-Werror,-Wimplicit-int-float-conversion]
2022-03-15 12:52:50 +01:00
binary1248
3315456dc3 Replaced select with poll in JoystickImpl to function even when a large number of file descriptors are open. 2022-03-12 13:09:11 +01:00
Chris Thrasher
2e6c363e64 Mark external headers as SYSTEM headers
Among other benefits this ensures that the compiler doesn't emit
warnings on headers in these paths.
2022-03-10 21:26:39 +01:00
Chris Thrasher
7dfc7f0202 Use new sf::Vector2<T> utilities 2022-03-03 19:20:09 +00:00