Commit Graph

442 Commits

Author SHA1 Message Date
Chris Thrasher
125a8ae360
Use char32_t for UTF-32 characters
This is probably an oversight from https://github.com/SFML/SFML/pull/2480
2024-11-27 14:32:47 -05:00
Chris Thrasher
d8c66ffc8d Remove backticks which are not correctly formatted 2024-11-17 12:58:27 -07:00
kimci86
dff83039aa Do not combine \a with backticks in doxygen comments
Using \a command displays the next word in italics ignoring the markdown
format so \a `something` display `something` in italics including
backticks.
Removing \a so that backticks are properly interpreted.
2024-11-08 19:58:22 -07:00
kimci86
799ca304ce Format index argument as code in shapes getPoint/setPoint documentation
We do the same in sf::Text::findCharacterPos documentation already.
2024-11-08 19:58:22 -07:00
kimci86
a8b0f6fb70 Emphasize words in documentation with markdown syntax 2024-11-08 19:58:22 -07:00
kimci86
6f16e3d701 Do not put backticks after \relates doxygen command
to fix unwanted backticks appearing in generated HTML
2024-11-08 19:58:22 -07:00
Chris Thrasher
06108ddf18 Add missing backtick
https://github.com/SFML/SFML-Website/pull/234#issuecomment-2465666419

Co-authored-by: kimci86 <kimci86@hotmail.fr>
2024-11-08 14:56:31 -07:00
Chris Thrasher
18eb48b13e Disallow C-style arrays 2024-10-17 21:40:41 -06:00
Chris Thrasher
c38b98c653 Upgrade to clang-format-17 2024-10-16 16:41:15 -06: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
Lukas Dürrenberger
ecb945b341 Use explicit constructors when implicit construction isn't wanted 2024-10-03 22:43:57 -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
vittorioromeo
37de949d87 Actually, don't define 2024-09-30 23:15:18 -06:00
Chris Thrasher
44b5237148 Fix out of date documentation code 2024-09-12 14:37:07 -06:00
Lukas Dürrenberger
016e201d17 Use backticks for SFML types in doc comments 2024-09-11 16:02:01 -06:00
Chris Thrasher
2b4a72ee06 Fix more outdated references to Mac OS X 2024-09-09 23:42:26 -06:00
Lukas Dürrenberger
9f52cfec39 Change spelling of anti-aliasing 2024-09-09 18:37:00 -06:00
Chris Thrasher
b55327b5b9 Remove unused header 2024-08-31 16:46:47 -06:00
Chris Thrasher
4a463ec136 Throw custom sf::Exception type 2024-08-25 12:17:49 -06:00
Lukas Dürrenberger
fa9f991686 Mark standard library types as code in doc strings 2024-08-15 13:56:14 +01:00
binary1248
e185f6d53e Replace factory functions with throwing constructors 2024-08-08 09:19:32 -06:00
binary1248
698f265277 (Re-)Introduce default constructors and load/open member functions for resource objects that can be reused. 2024-08-08 09:19:32 -06:00
Chris Thrasher
dffdaa52a7 Pass sf::Colors by value 2024-07-31 09:25:21 -06:00
Chris Thrasher
b0b4c7ff3d Fix documentation regarding bit widths 2024-07-21 17:52:58 -06:00
Chris Thrasher
c8c8673259 Pass sf::Vector2<T>s by value
As a rule of thumb, if the type is less than or equal to the CPU
register width times two then you ought to pass it by value. This
will lead to more efficient code generation.
2024-07-19 10:33:00 -06:00
ZXShady
6c415471d2 Apply changes
Putting the `= default` in the header file like other files do and not in the `.inl` implementation files for consistency
2024-07-18 14:16:27 -06:00
Chris Thrasher
51b8b44e14 Use more [[nodiscard]] 2024-06-27 19:02:46 -06:00
Chris Thrasher
e1469aa8f2 Use [[nodiscard]] in more places 2024-06-27 15:12:15 -06:00
Chris Thrasher
d7eeaea240 Add clang-tidy readability-else-after-return check 2024-06-27 12:17:03 -06:00
kimci86
fca4fa1aa2 Rename Font::loadFromFile into Font::openFromFile
Similar renaming for Font::loadFromMemory and Font::loadFromStream.
The goal is to better express the need to keep the source available,
similar to Music::openFromFile for example.
2024-06-25 22:53:28 +02:00
Chris Thrasher
7034e40ccc Document missing parameter 2024-06-24 14:14:08 -06:00
Chris Thrasher
14cff7406f Disallow construction from const T&& 2024-06-23 16:55:37 -06:00
vittorioromeo
86c1a71a93 Remove default empty state of sf::Event 2024-06-23 19:11:10 +02:00
Chris Thrasher
5580720ae0 Fix inconsistent factory function name 2024-06-17 10:10:00 -06:00
kimci86
f96bf1f300 Rename Rect comparison operands to avoid confusion 2024-06-16 02:48:53 +02:00
kimci86
58e83056bb Some simplifications taking advantage of Rect position and size members 2024-06-16 02:48:53 +02:00
kimci86
1fd510c4bf Update Rect documentation 2024-06-16 02:48:53 +02:00
kimci86
c371bc6816 Remove Rect getPosition and getSize methods 2024-06-16 02:48:53 +02:00
kimci86
7e5ed78219 Replace Rect members left, top, width, height by position and size 2024-06-16 02:48:53 +02:00
vittorioromeo
51efe50ec4 Simplify sf::Sprite implementation and reduce branches 2024-06-13 00:31:49 +02:00
Chris Thrasher
2f54312481 Fix documentation bugs 2024-06-12 14:38:04 -05:00
Chris Thrasher
bfd65989e9 Remove default empty state of sf::Texture 2024-06-04 13:19:58 -06:00
Chris Thrasher
46a71e4fe8 Add clang-tidy readability-redundant-member-init check
This has to be silenced for `sf::Vertex` because in some places within
SFML we initialize only a subset of this aggregate type. If we remove
the `{}` from `texCoords` then we get a compiler warning from Clang. It
feels like these two clang-based tools are somewhat contradictory.

error: missing field 'texCoords' initializer [-Werror,-Wmissing-field-initializers]
            m_points.append({{x, y}, {r, g, b}});
2024-06-04 00:56:24 -06:00
Chris Thrasher
55f0918c62 Remove sf::View::reset in favor of assignment operations
It's rare that a type truly needs a .reset function. Copy/move
assignment typically accomplishes the same thing with less code
and is easier to maintain since it doesn't require updating your
.reset() function as new data members are added.

To reset a type is conceptually the same thing as simply assigning
from a newly constructed instance of the same type.
2024-05-26 10:23:52 -06:00
vittorioromeo
e53f4d62af Turn 'ContextSettings' into an aggregate and update usages 2024-05-25 00:56:37 +02:00
Chris Thrasher
cc87ef7a3c Use std::string_view to construct sf::Shaders without allocations 2024-05-23 19:26:13 -06:00
Chris Thrasher
fdcd899d2b Remove default empty state of sf::RenderTexture 2024-05-22 23:37:42 -06:00
vittorioromeo
8b36da3625 Use '{}' for default parameter initialization 2024-05-22 11:54:49 -06:00
Chris Thrasher
7234fc149b Remove default empty state of sf::Shader 2024-05-19 20:58:58 -06:00
Chris Thrasher
504b850f03 Remove default empty state of sf::Font 2024-05-19 14:01:54 -06:00