Commit Graph

2896 Commits

Author SHA1 Message Date
Chris Thrasher
cdce9f7147 Use nested namespaces 2023-01-07 11:28:36 -07:00
Chris Thrasher
8a5e0f6933 Fix bug where clang-tidy CI job always passes 2023-01-06 17:17:57 -07:00
Chris Thrasher
098f6927d2 Prevent using a temporary sf::SoundBuffer with sf::Sound 2023-01-06 15:46:22 -07:00
Chris Thrasher
2d0c923a53 Prevent using a temporary sf::Texture with sf::Shader 2023-01-06 15:46:22 -07:00
Chris Thrasher
0c2f7da9f9 Prevent using a temporary sf::Texture with sf::Sprite 2023-01-06 15:46:22 -07:00
Noé Lopez
0bb6303cf8 Fix typo in error message 2023-01-06 18:46:34 +01:00
Chris Thrasher
3f4bb1ae12 Prevent constructing sf::Text with a temporary sf::Font
By deleting this constructor overload, it fails to compile if
you pass a temporary font to this parameter slot. That includes
code like

  sf::Text text("", sf::Font());

but more importantly it prohibits code like this

  sf::Font getFont()
  {
    sf::Font font;
    // load a font...
    return font;
  }

  sf::Text text("", getFont());

The same idea can be applied to setFont() to prevent setting fonts
from a temporary.

Credit to Jonny for the idea

Co-authored-by: JonnyPtn <jonathan.r.paton@googlemail.com>
2023-01-06 10:21:00 -07: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
Jim-Marsden
34b6323929 Changed to namespace 2023-01-01 14:31:26 -07:00
Lukas Dürrenberger
bf9f59d3e3
Merge pull request #2324 from 2.6.x
Backmerge
2022-12-30 17:50:45 +01: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
kimci86
f0b44937ce Update Image documentation regarding supported input formats 2022-12-29 00:08:52 +01:00
kimci86
3649fceb8b Update stb_image to v2.27 and stb_image_write to v1.16 2022-12-29 00:08: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
kimci86
37db7a83f3 Update Catch to v1.12.2 with latest bugfixes
It solves compilation errors with GCC 11.3 on Ubuntu 22.04
2022-12-22 08:37:50 -07:00
Jim-Marsden
77dcd712fb Changed inline const to constexpr 2022-12-19 16:06:40 -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
e8fa5d7d31
Add CI job for Clang on Windows 2022-12-14 15:26:08 -07:00
Lukas Dürrenberger
09ec31eeea
Merge pull request #2296 from 2.6.x 2022-12-14 18:08:32 +01: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
07bf6f8c12 Add option for enabling DRM 2022-12-13 21:52:42 -07:00
Chris Thrasher
3b6db4d18c Enforce variable case 2022-12-12 16:10:03 -07:00
Chris Thrasher
ad416ab531 Check for minimum required clang-tidy version 2022-12-12 16:10:03 -07:00
Chris Thrasher
75b0c3a9a1 Disable warnings as errors for Clang on Windows 2022-12-12 12:09:51 -07:00
Chris Thrasher
fa2e61b9d5 Lock CI jobs to Ubuntu 20
Recently GitHub updated the ubuntu-latest images to point at Ubuntu
22 which broke CI for ths 2.6.x branch so let's stick to Ubuntu 20
until we can sort out what was failing.
2022-12-12 12:09:51 -07:00
Chris Thrasher
75642ef7aa Enable warnings as errors for clang-cl.exe 2022-12-11 13:51:15 -07:00
Chris Thrasher
e54bf87e9b Enable MSVC deprecation warning 2022-12-11 13:51:15 -07:00
fuzzdistor
7faa5507a4
Rearanged members of Transformable for a smaller object size 2022-11-29 01:28:05 -07:00
Chris Thrasher
4807c779a7 Apply warnings to install test
Because the install test project can't access SFML CMake functions,
these warnings are only applied when building the install tests as
a part of SFML.
2022-11-29 00:47:32 -07:00
Chris Thrasher
8c6b578012 Disallow clang-format version 15 and newer 2022-11-27 13:39:40 -06:00
Chris Thrasher
c5bd4a4063 Run all formatting jobs on Ubuntu 22.04 2022-11-27 13:39:40 -06: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
Jonny
8e3efab09d
Retry choco install step up to 10 times
With a timeout of 3min
2022-11-23 08:35:31 +01:00
Christian Ivicevic
a9f33999dc
Fix outdated use of the sf::VideoMode constructor 2022-11-22 14:55:52 +01:00
jim
1d4db22d62 Added move constructor/operator 2022-11-19 19:52:45 -07:00