Commit Graph

2449 Commits

Author SHA1 Message Date
Vittorio Romeo
0901d5861f Propagate 'AlResource' changes to 'SoundRecorder' and 'SoundSource' 2022-02-15 16:06:29 +00:00
Vittorio Romeo
a68743aa61 Add move semantics to 'Sound' 2022-02-15 16:06:12 +00:00
Vittorio Romeo
b2644e5c3f Add move semantics to 'SoundBuffer' 2022-02-15 16:05:49 +00:00
Vittorio Romeo
8a11078075 Add move semantics to 'AlResource' 2022-02-15 16:05:26 +00:00
Vittorio Romeo
5b500ad2c2 Turn more compile-time constants into 'constexpr' variables 2022-02-15 13:27:10 +00:00
binary1248
9d51a6bd50 Fix license detection and add helpful links to external libraries and their licenses. 2022-02-11 08:29:00 +01:00
Vittorio Romeo
dbeef66693 Turn 'sf::Transform' into a 'constexpr' class 2022-02-10 23:51:47 +00:00
Vittorio Romeo
63ce7e4e92 Remove unnecessary includes from public-facing headers 2022-02-10 21:05:49 +00:00
binary1248
d7f48d15c6 Adjust .codecov.yml to make coverage have minimal impact for now. 2022-02-10 21:05:13 +01:00
binary1248
66339bc09c Added support for coverage reporting. 2022-02-10 08:08:47 +01:00
Vittorio Romeo
0e419543f2 Make 'Color' constants 'constexpr' and add tests 2022-02-08 23:32:12 +00:00
Chris Thrasher
28f273b9c9 Add sf::Angle
Similar to sf::Time, sf::Angle provides a typesafe API for working
with angles and provides named functions for converting to and from
degrees and radians.
2022-02-08 22:52:37 +00:00
Lukas Dürrenberger
ef8d6ee7f7 Remove VS 2017 as GitHub Actions compiler
VS 2017 doesn't fully support C++17
2022-02-05 19:11:15 +01:00
Chris Thrasher
0c8c35fa0c Fix findIntersection documentation 2022-02-04 09:35:34 +01:00
Chris Thrasher
8f1955af17 Don't add SFML:: namespace to external targets
The SFML target export set includes a number of external targets
which are not owned by the project itself. This includes targets
like Freetype and OpenGL. By specifying a namespace for the export
set, a SFML:: namespace was prepended to all targets. This is not
a problem when using shared libraries but when building and using
static libraries caused a problem where CMake was attempting and
failing to find targets with names like SFML::Freetype or
SFML::OpenGL which did not exist.

Luckily CMake allows you put namespaces in the EXPORT_NAME target
property so now we can just add the SFML:: namespace in the macro
which creates SFML targets and remove the `NAMESPACE SFML::` line
which was adding namespaces to all targets.
2022-01-28 08:11:53 +01:00
Chris Thrasher
7c80f302e4 Use std::optional to remove extra sf::Rect::intersects overload 2022-01-27 02:55:11 +00:00
Chris Thrasher
0ad6d1815c Remove unnecessary CMake version requirement
This is left over from 0f83e3d but we forgot to remove it. Nothing
about this file requires an elevated minimum CMake version now that
the FetchContent usage is gone.
2022-01-22 15:51:27 +01:00
kimci86
ad21794f39 Fix runtests target for multi-configuration generators 2022-01-21 21:19:32 +01:00
Chris Thrasher
052e624ddf Remove GCC 4 workaround 2022-01-21 21:19:05 +01:00
Chris Thrasher
a322d18e63 Use built-in CMake project version functionality 2022-01-21 21:09:20 +01:00
Lukas Dürrenberger
60deef9997 Add support for VS 2022 to the GitHub Actions workflow 2022-01-20 10:53:52 +01:00
Chris Thrasher
7cdb728e52 Add tests for sf::BlendMode 2022-01-20 07:39:19 +01:00
Chris Thrasher
871c021a75 Add tests for sf::ContextSettings 2022-01-13 23:49:37 +01:00
Vittorio Romeo
a880122836 Reintroduce 'SleepImpl' sleep implementation 2022-01-12 00:01:35 +00:00
Chris Thrasher
da6a226941 Add tests for sf::Clock 2022-01-11 22:49:00 +00:00
Chris Thrasher
4586db91a9 Add SFML:: namespace to targets
This removes the sfml- prefixed targets from the export set. The sfml-
prefixed targets are still available within the build tree but not to
downstream users thus making this an API breaking change when compared
to the 2.x releases. To keep things consistent, usage of the sfml-
targets were replaced with their namespaced counterparts.

This has a number of benefits:

  1. It's more idiomatic. Modern CMake libraries are expected to
     have namespaced targets.

  2. Namespaced targets are less likely to collide with user-defined
     targets. No one will accidentally define a SFML:: target.

  3. If a namespaced target is not found by CMake, configuration
     will immediately stop.
2022-01-11 22:27:39 +01:00
Chris Thrasher
b717a68fba Add tests for sf::Transform 2022-01-08 15:06:12 +01:00
Lukas Dürrenberger
c36a7821ee
Merge pull request #1961 from SFML/feature/back_merge
Back-merge changes from 2.6.x to master
2022-01-08 13:04:53 +01:00
Lukas Dürrenberger
3a402f241a Merge branch '2.6.x' into feature/back_merge 2022-01-08 12:28:34 +01:00
Chris Thrasher
3d01efb80a Use operator<< for printing during test failure 2022-01-07 20:04:54 +01:00
Chris Thrasher
cd84b19669 Define fixed-width integer type aliases in terms of standard fixed-width types 2022-01-06 21:02:14 +01:00
Chris Thrasher
79c2aadbcc Remove redundant 4-param sf::Rect<T> constructor 2022-01-06 20:04:03 +01:00
Chris Thrasher
6c816aba44 Add tests for sf::Vertex 2022-01-06 20:02:09 +01:00
Chris Thrasher
7d47e740bb Only build Cocoa example when using Xcode 2022-01-04 23:05:23 +01:00
Jan Haller
2ea46c8702 Fix WindowImplX11 initialization 2022-01-04 19:21:32 +01:00
Chris Thrasher
3197dc8029 Remove redundant formatters 2022-01-03 08:27:43 +01:00
Vittorio Romeo
3dc8fc0923 Add 'NetworkUtil' for network module tests 2022-01-03 01:00:55 +01:00
Chris Thrasher
ff4fc05b18 Stop configuration when GCC is detected on macOS 2022-01-02 23:15:05 +01:00
Jan Haller
3b06972602 Update year to 2022 2022-01-02 23:06:31 +01:00
Vittorio Romeo
5ba6580568 Make 'Time' a 'constexpr' class 2021-12-28 16:52:52 +01:00
Chris Thrasher
dafdacfa20 Let tests and examples inherit language requirement from upstream targets
It's not necessary to re-specify cxx_std_17 since any example or test
which depends on a core target (which should be all of them) will pick
up this language requirement that should be a public property of those
targets. If that changes, these examples and tests will possibly fail
to compile and correctly catch the bug that was introduced in the core
library targets.
2021-12-28 15:53:08 +01:00
Chris Thrasher
f5541d22e5 Add tests for sf::VideoMode 2021-12-27 19:09:35 +01:00
Vittorio Romeo
50d28e3879 Add tests for 'sf::Color' 2021-12-27 17:35:06 +01:00
Chris Thrasher
14fff20eb8 Remove redundant API taking x,y pair instead of sf::Vector 2021-12-26 17:13:18 +01:00
Vittorio Romeo
29983aa8d4 Replace Catch with Doctest 2021-12-24 15:06:32 +01:00
Chris Thrasher
ade9843dd8 Collapse test/src directory 2021-12-24 11:56:58 +01:00
Chris Thrasher
54b8a691d1 Add unit tests for sf::Time 2021-12-23 20:34:33 +01:00
kimci86
53594dfbe7 Fix null pointer dereference in Font 2021-12-23 17:03:16 +01:00
Vittorio Romeo
46639ed277 Manipulate library names on Windows + Clang 2021-12-22 08:53:03 +01:00
kimci86
d0c63f46fc Use a smart pointer to manage std::FILE pointer in FileInputStream 2021-12-22 02:35:45 +01:00