From c596d6cf3f305fa0a3ba9e469169e25c61cdcc8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Mon, 28 Aug 2023 14:27:05 -0400 Subject: [PATCH] fix: use non-deprecated form of UDL declaration Clang 18 issues a deprecation warning, and is converted to an error with `-Werror`. --- include/SFML/System/Angle.hpp | 8 ++++---- include/SFML/System/Angle.inl | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/SFML/System/Angle.hpp b/include/SFML/System/Angle.hpp index dff4a1f2d..92b759eb7 100644 --- a/include/SFML/System/Angle.hpp +++ b/include/SFML/System/Angle.hpp @@ -435,7 +435,7 @@ namespace Literals /// \return \a Angle /// //////////////////////////////////////////////////////////// -[[nodiscard]] constexpr Angle operator"" _deg(long double angle); +[[nodiscard]] constexpr Angle operator""_deg(long double angle); //////////////////////////////////////////////////////////// /// \relates sf::Angle @@ -446,7 +446,7 @@ namespace Literals /// \return \a Angle /// //////////////////////////////////////////////////////////// -[[nodiscard]] constexpr Angle operator"" _deg(unsigned long long int angle); +[[nodiscard]] constexpr Angle operator""_deg(unsigned long long int angle); //////////////////////////////////////////////////////////// /// \relates sf::Angle @@ -457,7 +457,7 @@ namespace Literals /// \return \a Angle /// //////////////////////////////////////////////////////////// -[[nodiscard]] constexpr Angle operator"" _rad(long double angle); +[[nodiscard]] constexpr Angle operator""_rad(long double angle); //////////////////////////////////////////////////////////// /// \relates sf::Angle @@ -468,7 +468,7 @@ namespace Literals /// \return \a Angle /// //////////////////////////////////////////////////////////// -[[nodiscard]] constexpr Angle operator"" _rad(unsigned long long int angle); +[[nodiscard]] constexpr Angle operator""_rad(unsigned long long int angle); } // namespace Literals diff --git a/include/SFML/System/Angle.inl b/include/SFML/System/Angle.inl index 4e91e0245..4d4ea3974 100644 --- a/include/SFML/System/Angle.inl +++ b/include/SFML/System/Angle.inl @@ -226,28 +226,28 @@ namespace Literals { //////////////////////////////////////////////////////////// -constexpr Angle operator"" _deg(long double angle) +constexpr Angle operator""_deg(long double angle) { return degrees(static_cast(angle)); } //////////////////////////////////////////////////////////// -constexpr Angle operator"" _deg(unsigned long long angle) +constexpr Angle operator""_deg(unsigned long long angle) { return degrees(static_cast(angle)); } //////////////////////////////////////////////////////////// -constexpr Angle operator"" _rad(long double angle) +constexpr Angle operator""_rad(long double angle) { return radians(static_cast(angle)); } //////////////////////////////////////////////////////////// -constexpr Angle operator"" _rad(unsigned long long angle) +constexpr Angle operator""_rad(unsigned long long angle) { return radians(static_cast(angle)); }