Norm Evangelista
39dd630f07
Added modernize-use-nullptr check
...
Addressed review comments
Fixed Vulkan.cpp clang-tidy issues
Used default-constructed objects instead of 0
More fun with OSX clang-tidy
Try casting a nullptr to see if clang-tidy can live with it
Revert "Try casting a nullptr to see if clang-tidy can live with it"
This reverts commit e217a1d8be45e3fd27dc73e1c7043be921d3830b.
Restored deleted line
2023-01-11 17:36:16 -07:00
Chris Thrasher
badb388507
Remove unnecessary casts
2023-01-11 15:30:22 -07:00
Jim-Marsden
b2009e2fca
Changed from std::scoped_lock to std::lock_guard
2023-01-11 15:07:29 -07:00
Chris Thrasher
cdce9f7147
Use nested namespaces
2023-01-07 11:28:36 -07:00
Noé Lopez
0bb6303cf8
Fix typo in error message
2023-01-06 18:46:34 +01:00
Chris Thrasher
718195bf25
Mark move operators as noexcept
2023-01-04 09:49:20 -07:00
Chris Thrasher
9a4426fb35
Simplify in-class initializer expressions
2023-01-03 14:51:44 -07:00
Chris Thrasher
259b57d9b9
Use in-class member initializers
2023-01-02 16:26:51 -07:00
Chris Thrasher
15cdb40fc2
Merge branch '2.6.x' into feature/backmerge
2022-12-29 22:48:49 -07:00
marwen.azouzi
5e9bb60d68
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-12-29 14:56:52 +01:00
Shiv
9bdf207818
Use std::clamp
2022-12-27 17:58:49 -06:00
Jim-Marsden
7884efc49e
Replaced Header Guards with Pragma Once
2022-12-27 20:08:11 +01:00
dan
3ae6848727
Update x11 sf::Cursor::Hand to use xc_hand2 instead of xc_hand1, in order to be consistent with windows and macos
2022-12-27 11:32:23 +01:00
Benjamin Li
e8a50f028b
Removing unnecessary destructor in WindowImplUIKit
2022-12-27 11:08:11 +01:00
Benjamin Li
9c7b7d68c0
Use = default to define empty destructors #2311
2022-12-27 11:08:11 +01:00
Chris Thrasher
50d86e4755
Use in-class member initializers
2022-12-22 09:36:54 -07:00
Chris Thrasher
8587a1b946
Ensure diagnostic pop occur before end of header guard
...
Maybe we just use pragma once...
2022-12-19 00:25:08 +01:00
Chris Thrasher
b7198b08d6
Use in-class member initializers
2022-12-18 09:11:22 -07:00
Chris Thrasher
8049aa3b75
Add -ObjC flag to fix static linking on macOS
...
Fixes regression introduced in aa3a30c
2022-12-17 15:00:13 -07:00
zakinadhif
253a4abad4
Replace c-style casts & fix implicit conversion warnings. SFML/SFML#2297
2022-12-15 13:12:56 -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
c0acaef204
Use in-class member initializers
2022-12-15 00:41:19 -07:00
Chris Thrasher
dc9d794722
Merge remote-tracking branch 'origin/2.6.x' into feature/backmerge
2022-12-13 23:06:49 -07:00
Chris Thrasher
ed6d944810
Always trigger drmModeSetCrtc
2022-12-13 21:52:42 -07:00
Chris Thrasher
866dbee8cb
Add DRM utilities to sfml-window
2022-12-13 21:52:42 -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
Chris Thrasher
0bdefd25d7
Use in-class member initializers
...
See C++ Core Guidelines item C.45 for more information.
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c45-dont-define-a-default-constructor-that-only-initializes-data-members-use-in-class-member-initializers-instead
2022-11-17 18:44:36 -07:00
Bruno Van de Velde
c744369552
Use Per Monitor Aware instead of System Aware for DPI scaling on Windows
2022-11-15 22:38:52 +01:00
Chris Thrasher
ca9531bcbd
Remove the use of std::memset
2022-11-15 22:37:37 +01:00
kimci86
0310b03aef
Document that checking XButton1 and XButton2 state on X11 is not supported
2022-11-15 22:36:37 +01:00
Lukas Dürrenberger
d4d518e1be
Merge branch '2.6.x' into master
2022-10-25 19:17:35 +02:00
kimci86
f796205a21
Process events in order to avoid X11 input method being confused
2022-10-24 23:14:48 +02:00
kimci86
b11328f386
Fix duplicated KeyPressed events with X11
...
Co-authored-by: Edgaru089 <sjs333@outlook.com>
2022-10-24 23:14:48 +02:00
Subs
65ef0619c8
[DRM] Use the current resolution
...
In order to prevent an unnecessary modeswitch and use the current TTY resolution, don't use the preferred mode reported by DRM. This is useful for people who set a custom resolution at boot and are forced into the monitor's preferred resolution when a SFML DRM app starts
2022-10-24 00:16:32 +02:00
Chris Thrasher
33e82e1262
Start enforcing naming style
2022-10-23 17:32:13 +02:00
Chris Thrasher
a5dbe59f07
Merge branch '2.6.x'
2022-10-13 14:33:11 -06:00
Chris Thrasher
5cd8a164dd
Use list(APPEND
more
2022-10-12 00:23:35 +02:00
Vittorio Romeo
fd5c358c98
Add PCH builds via 'SFML_ENABLE_PCH' CMake option
2022-10-09 14:21:11 +02:00
Vittorio Romeo
753644a5bd
Fix CMake formatting inconsistencies
2022-10-06 20:33:40 +02:00
Vittorio Romeo
e948a5f41e
Improve static initialization of vectors
2022-10-06 19:58:10 +02:00
kimci86
01fc55ba37
Include InputStream.hpp directly in SoundFileReaderMp3.cpp
...
instead of indirect inclusion through MemoryInputStream.hpp
2022-10-01 19:50:57 +02:00
kimci86
b5be18cd8d
Fix typo in variable name
2022-10-01 11:09:09 -06:00
Radek Dutkiewicz
2db12350e7
Fix corelation between text setOutlineThickness() and getLocalBounds()
...
This fixes text crawling explained in issue #2129
2022-10-01 13:53:43 +02:00
Ralph Dworzanski
2bca810025
Use iterator and correct string insert
2022-09-29 19:42:31 +02:00
Chris Thrasher
34ee40c835
Use scoped enumerations in Network module
2022-09-27 17:30:13 +02:00
Chris Thrasher
3a3935d005
Replace sf::Uint64
with std::uint64_t
2022-09-13 11:15:03 -06:00
Chris Thrasher
05690b963d
Replace sf::Int64
with std::int64_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
056f66a2b8
Replace sf::Int32
with std::int32_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
e21ae3204e
Replace sf::Int16
with std::int16_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
af34794123
Replace sf::Int8
with std::int8_t
2022-09-09 10:28:53 +02:00
Chris Thrasher
82b48a7520
Use std::size_t
2022-09-07 22:23:22 +02:00
LDprg
f521e2ec48
fix formatting and add comment
2022-09-06 16:00:39 +03:00
LDprg
0584448a06
speed up code by 10 times replacing hypot with sqrt
2022-09-06 16:00:39 +03:00
Chris Thrasher
8561101b11
Add conversions between sf::Time
and std::chrono::duration
s
2022-09-05 23:35:25 +02:00
Chris Thrasher
78e532215a
Simplify how lists are expanded
2022-08-22 11:26:57 +08:00
Chris Thrasher
78d99fe828
Simplify sfml-audio link libraries call
2022-08-22 11:26:57 +08:00
Chris Thrasher
142ccf57bd
Enable compiler warnings for Android
2022-08-12 18:01:36 +02:00
Chris Thrasher
a71d60a0c9
Simplify how warnings are ignored on Apple platforms
...
Within files that are only compiled on Apple platforms, we don't
need that redundant check for __APPLE__ so that got removed. Further,
Clang will recognize GCC pragmas so we don't need both Clang AND GCC
pragmas so I removed the Clang pragmas.
Currently GCC fails to compile this code but if one day in the future
that gets fixed, the deprecation warnings will continue to get ignored.
2022-08-03 23:41:01 +02:00
friendlyanon
e691033954
Require CMake 3.16 for ObjC and ObjC++ sources
...
Both languages gained native CMake support in 3.16:
https://cmake.org/cmake/help/latest/release/3.16.html#languages
2022-08-03 23:38:17 +02:00
kimci86
80ed37ce9d
Fix SoundStream::play to restart the sound if it was played before
2022-08-03 23:36:12 +02:00
Chris Thrasher
97537d36b3
Remove unnecessary CMake version checks
...
Now that the project requires CMake version 3.15, all of these
checks are guaranteed to eveluate one way or the other so they can
be removed.
2022-07-18 12:43:49 +02:00
Chris Thrasher
55a1a2a4c4
Format .m files
2022-07-14 21:47:49 +02:00
Chris Thrasher
e2f0feaefc
Disable OpenGL deprecation warnings
...
This was likely transitively included from another header from after
clang-format rearranged some headers, it was no longer present.
2022-07-11 20:04:56 +02:00
Chris Thrasher
87c4213ac6
Add missing headers
...
Reformatting with clang-format revealed that a few files were missing
some #include and #import statements.
2022-07-11 20:04:56 +02:00
Chris Thrasher
4f52793f7d
Run clang-format
2022-07-11 20:04:56 +02:00
metaquarx
88e9f82bee
Add '.clang-format' file, CI integration, and formatting exceptions
...
Co-authored-by: Vittorio Romeo <vittorio.romeo@outlook.com>
Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com>
Co-authored-by: kimci86 <kimci86@hotmail.fr>
2022-07-11 20:04:56 +02:00
kimci86
faaec51666
Fix compilation on Linux with SFML_OPENGL_ES option
2022-06-29 09:02:29 +02:00
Vittorio Romeo
8c8d97c6c9
IpAddress is always valid
2022-06-28 00:31:12 +02:00
kimci86
ee8f929bd6
Load EGL with glad to fix crash in sf::priv::eglCheckError on DRM
2022-06-27 20:39:30 +02:00
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
kimci86
5098b6c22b
Fix eglCheck macro usage for assignments
2022-06-24 09:33:48 +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
kimci86
618c96339b
Fix incorrect cast when parsing FTP connection port
2022-06-23 16:33:06 +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