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
45986c6400
Avoid opening namespace std
2022-09-05 23:35:25 +02:00
Chris Thrasher
8561101b11
Add conversions between sf::Time
and std::chrono::duration
s
2022-09-05 23:35:25 +02:00
Chris Thrasher
ebb2d9d186
Implement sf::Time
with <chrono>
2022-09-05 23:35:25 +02:00
LDprg
41053f9983
edit gitignore to ignore clion default output directory
2022-09-05 22:32:44 +02:00
Chris Thrasher
72d88033e2
Use relative paths for resource files
2022-08-22 11:26:57 +08:00
Chris Thrasher
40b175adf4
Remove check for old macOS versions
...
There is no need to check for macOS 10.6 or lower. Snow Leopard came
out in 2009. Because it's nearly 13 years old, it's safe to say
nobody will be trying to build SFML 3 on Snow Leopard.
This was added in de70f691e
way back in 2011 when Snow Leopard was
a mere cub.
2022-08-22 11:26:57 +08:00
Chris Thrasher
b7510fd09e
Fix formatting and style
...
Use all lower_case commands with no space between the command name
and the open parentheses. Don't repeat conditional in else() and
endif() calls.
2022-08-22 11:26:57 +08:00
Chris Thrasher
78e532215a
Simplify how lists are expanded
2022-08-22 11:26:57 +08:00
Chris Thrasher
8384139983
Remove unnecessary variable assignment
...
This same code already exists in src/CMakeLists.txt
2022-08-22 11:26:57 +08:00
Chris Thrasher
164c5025c7
Remove commented code
...
Commented out in f4c25ac3f
shortly after it was added. I don't have
reason think this code will be resurrected if it's been ignored for
the last 4 years. It's safe to remove at this point.
2022-08-22 11:26:57 +08:00
Chris Thrasher
20b7529334
Remove unecessary preprocessor defines
...
This is already handled by disabling warning C4996
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996?view=msvc-170
2022-08-22 11:26:57 +08:00
Chris Thrasher
5b132f25e5
Fix outdated comment
2022-08-22 11:26:57 +08:00
Chris Thrasher
30bf8df273
Simplify module include path
2022-08-22 11:26:57 +08:00
Chris Thrasher
1dcaa9a396
Fix CMake error messages
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
aa82ea132b
Set warnings with target_compile_options
...
The use of target_compile_options makes it easy to append warnings
to a target. The use of generator expressions also more succinctly
handles a few edge cases for compiler bugs and platform-specific
oddities.
This should be easy to read and maintain than the variable-based
solution it replaces.
2022-08-14 14:00:00 +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
Chris Thrasher
49fd5887c8
Add tests for SFML/Config.hpp
2022-08-03 23:39:37 +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
Chris Thrasher
a47eb8320a
Remove vendored doctest header
2022-07-20 08:56:59 +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
Miron Alexandru
dd0f0ff4c6
Update .gitignore for Visual Studio
2022-07-13 15:17:42 +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
Bambo-Borris
c6f7fcaa2a
Add tests for sf::MemoryInputStream
2022-06-28 14:33:21 +02:00
Vittorio Romeo
8c8d97c6c9
IpAddress is always valid
2022-06-28 00:31:12 +02:00
Chris Thrasher
fd3526f742
Use <>
for test utilities includes
...
SFML convention is to only use "" includes when the header is in
the same directory as the file including it. Because these test
util headers are in a separate directory, it makes more sense to
include them via <>.
2022-06-27 00:22:16 +02:00
Chris Thrasher
4047909725
Remove unnecessary includes
2022-06-27 00:22:16 +02:00
Chris Thrasher
a57640c2c8
Require stringification for all tested types
...
This ensures that if a printing function is not provided, compilation
fails. This prevents problems where a header is accidentally removed
that was previously providing an operator<< overload or prevents
new tests from being added without print support for all directly
tested types.
2022-06-27 00:22:16 +02:00
Chris Thrasher
3925139f4d
Improve test coverage of sf::Rect
2022-06-26 15:47:30 +02:00
Chris Thrasher
b009151e89
Improve test coverage of sf::Color
2022-06-26 15:47:30 +02:00
Chris Thrasher
44d3d63ade
Reduce the scope of helper class
2022-06-26 02:14:53 +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
Vittorio Romeo
a3dd3e02aa
Remove unused <string>
include from Texture.hpp
2022-06-24 12:59:30 +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
Chris Thrasher
e4e9b290b1
Add tests for sf::IpAddress
2022-06-23 18:47:23 +02:00
Chris Thrasher
ce9577bbff
Upgrade to Doctest v2.4.9
...
Fixes some linker errors and a compiler error described here:
https://github.com/doctest/doctest/issues/636
2022-06-23 18:47:23 +02:00
Vittorio Romeo
e4c5af63b7
Replace 'TcpSocket::send' local buffer with data member
2022-06-23 18:37:01 +02:00
kimci86
95201a3950
Update Image code example with Vector2u parameters
2022-06-23 18:03:54 +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