Commit Graph

3562 Commits

Author SHA1 Message Date
ZXShady
f8d77ea822 Make true and false keywords lowercase and monospaced in docs
Continues the work of pr #3213
2024-10-08 10:26:22 +02:00
Chris Thrasher
46a1b568a9 Stop uploading code coverage from non-pull request CI runs 2024-10-08 08:32:42 +02:00
ZXShady
d9f3634750 Remove unnecessary trailing return types
The lamdba can deduce the return type correctly having it deducing it
automaticly makes less rooms for mistakes later when we change the impl.
2024-10-07 23:01:34 -06:00
ZXShady
e8f59f9d4c Remove empty lamdba parenthesis 2024-10-07 21:01:24 -06:00
ZXShady
eeef7f9e02 Remove unnecessary friend declarations
These functions do not access any private functions they do not need to be `friend`ed
2024-10-06 13:08:22 -06:00
ZXShady
26eb6348e5 Remove unneeded function prefix in implementation files
I used nested namespaces from C++17 instead, of having to specify the namespace for the function implementation.
2024-10-06 12:57:47 -06:00
ZXShady
5ed16195b3 Use correct iterator comparison
Switching the iterator comparison used lowers the requirement for
iterators from *RandomAccessIterators* to *ForwardIterators*, which is a
benefit. It is also more accurate; instead of saying "if `begin` is less
than the end, stop." it states "if `begin` is not equal to end, stop."

Additionally, the old '<' did not protect us from undefined behavior because it is
undefined to compare two iterators relationally that are not:

1. past the end
2. within the array
2024-10-06 11:36:00 -06:00
ZXShady
d4ee28c441 Use initializer list instead of assigning in body 2024-10-05 11:31:21 -06:00
Lukas Dürrenberger
9af5d87ac8
Merge 2.6.x to master 2024-10-05 19:08:50 +02:00
ZXShady
72207a63ef Use inherited constructors instead of constructor delegation
sf::Exception can use the inheriting constructors functionality instead of a constructor delegating to the parent constructor.

I removed Exception.cpp as it is not needed anymore.
2024-10-05 10:22:49 -06:00
ZXShady
9169e11195 Remove unneeded class prefixes 2024-10-05 09:41:45 -06:00
ZXShady
8fd67a0d99 Remove wrong comment
There is no explicit scope made specifically for an RAII variable, so I removed the comment
2024-10-05 13:37:06 +01:00
Lukas Dürrenberger
d1e98a9600 Merge branch '2.6.x' into master 2024-10-05 00:02:57 +02:00
ZXShady
cfc43f50a7 Use sf::VertexArray.clear instead of .resize(0) 2024-10-04 10:43:35 -06:00
Lukas Dürrenberger
ecb945b341 Use explicit constructors when implicit construction isn't wanted 2024-10-03 22:43:57 -06:00
vittorioromeo
816855d13f Remove sf::Vector2<T>::Unit[XY] 2024-10-03 20:51:09 -06:00
Chris Thrasher
a9298df466 Upgrade all macOS 12 CI jobs to macOS 13 2024-10-03 19:13:55 -06:00
Chris Thrasher
c67e835e81 Remove Android CI unit testing infrastructure
Initially we had 3 of 4 Android CI jobs running the tests. Various
problems caused us to disable testing in 2 of those 3 jobs. Now
we're dealing with the last Android CI job failing to run the tests.
Because this is blocking CI and because the value of running these
tests it not especially high, I am removing this testing
infrastructure. We can reconsider this decision in the future if a
more reliable solution is found.

This is a reversion of most of 2386653.
2024-10-03 14:34:07 -06:00
ZXShady
de9286c11f Use explicit conversion operator instead of explicit constructor
I also added a type trait test to check whether the conversion operator is marked explicit.

this change has the advantage of being  clearer imo as it is a conversion operator for conersions not a constructor.

and also it allows users to take the address of convesion operator which I don't know if someone might find that useful.
2024-10-02 00:15:54 +02:00
Chris Thrasher
4e77e3ee95 Revert to LLVM 18 until we can upgrade to macOS 14 images 2024-10-01 14:51:41 -06:00
ZXShady
c8dbd65ff5 use if constexpr instead of a switch statement
The condition is a constant expression, it makes more sense here to use `if constexpr`
2024-10-01 00:00:48 -06:00
vittorioromeo
37de949d87 Actually, don't define 2024-09-30 23:15:18 -06:00
ZXShady
71594d402e delegate to operator equals in operator not equals 2024-09-30 09:03:35 -06:00
Chris Thrasher
ea08388e7a Remove unnecessary ternaries
It's simpler to let the boolean get promoted to an integer
2024-09-29 23:34:27 -06:00
Lukas Dürrenberger
053ef0b483 Prefer try_emplace over emplace for maps 2024-09-27 10:10:23 -06:00
vittorioromeo
eb4a2dbe0f Drain errors in [E]GLCheck via loop 2024-09-27 10:09:07 -06:00
vittorioromeo
7cec342b2b DRY shader creation via helper lambda 2024-09-26 16:33:05 -06:00
vittorioromeo
a9c56da99e Fix island example freeze when submitting work too quickly 2024-09-26 18:04:32 +02:00
Chris Thrasher
d2ca038e2a Actually let's not 2024-09-25 20:37:43 -06:00
Chris Thrasher
9d1e5d9acf Prevent reading from an uninitialized character buffer
If `GLEXT_glGetInfoLog` fails then `log` is left unchanged which
can lead to a reading from an uninitialized buffer on the following
line. Initializing the buffer ensures this never happens. While I
was touching this code I elected to switch to `std::array` as well
since SFML has made previous efforts to stop using C-style arrays
and I wanted to continue that effort.
2024-09-25 19:34:16 -06:00
Zombieschannel
40fc524b8d InputImpl.hpp now has Android implementation 2024-09-25 17:15:16 -06:00
ZXShady
0d33ddeccf Change glCheck macro to be usable as an expression 2024-09-25 09:47:36 -06:00
Chris Thrasher
c8cf84511d Fix clang-tidy-19 errors 2024-09-24 18:42:31 -06:00
Vittorio Romeo
1f11e91bed Avoid unnecessary assignment in Text::findCharacterPos 2024-09-22 14:20:25 +02:00
Lukas Dürrenberger
02fe28f35b Fix regex for SFML_USE_STATIC_STD_LIBS 2024-09-19 21:21:33 +02:00
kimci86
267bbe35b8 Simplify island example using vectors and extracting repetitive code 2024-09-17 22:38:51 +02:00
Lorenzooone
5545df7290 Use lazy loading for keyboard scancodes on macos (backport) 2024-09-16 17:41:41 -04:00
Lorenzooone
6bcc3414fc Use lazy loading for keyboard scancodes on macos 2024-09-16 16:35:12 -04:00
Vittorio Romeo
20b048fb08 Replace swap with move where appropriate 2024-09-16 13:29:52 -04:00
Lukas Dürrenberger
6591c59504 Add window create functions without style specifier
This brings the create() functions inline with the constructor overloads
for WindowBase, Window, and RenderWindow
2024-09-16 12:05:59 -04:00
Vittorio Romeo
e2ea1d8a7c Simplify and extend [E]GLCheck implementation 2024-09-16 12:02:54 -04:00
Lukas Dürrenberger
2dd72be036 Fix Windows ARM64 support with regards to Mesa 3D
- Only fail the Mesa 3D arch check, if it's been enabled
- Add a cross-compilation CI job for Windows ARM64
- Fix ARM64 architecture detection for the Ninja generator
2024-09-14 13:44:34 +02:00
Lukas Dürrenberger
8ff95f7a5e Add the missing ChannelMap to the example code 2024-09-14 09:11:16 +02:00
Lukas Dürrenberger
2116a3ba85 Extend the migration guide regarding the sf::Text constructor change 2024-09-12 17:54:34 -06:00
Chris Thrasher
eeb43e4747 Use sf::Vector3f to simplify Vulkan example 2024-09-12 15:18:44 -06:00
Chris Thrasher
44b5237148 Fix out of date documentation code 2024-09-12 14:37:07 -06:00
Chris Thrasher
7eab4606e0 Use standard CMake variables for Doxygen paths 2024-09-12 12:21:09 -06:00
Chris Thrasher
acc87dfd32 Simplify how Doxygen CMake variables are set 2024-09-12 12:21:09 -06:00
Vittorio Romeo
9c3fcd72d0 Use gender-neutral language in comments 2024-09-12 17:37:10 +02:00
Lukas Dürrenberger
016e201d17 Use backticks for SFML types in doc comments 2024-09-11 16:02:01 -06:00