fix: use non-deprecated form of UDL declaration

Clang 18 issues a deprecation warning,
and is converted to an error with `-Werror`.
This commit is contained in:
Johel Ernesto Guerrero Peña 2023-08-28 14:27:05 -04:00 committed by Chris Thrasher
parent 1cca7cde7e
commit c596d6cf3f
2 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -226,28 +226,28 @@ namespace Literals
{
////////////////////////////////////////////////////////////
constexpr Angle operator"" _deg(long double angle)
constexpr Angle operator""_deg(long double angle)
{
return degrees(static_cast<float>(angle));
}
////////////////////////////////////////////////////////////
constexpr Angle operator"" _deg(unsigned long long angle)
constexpr Angle operator""_deg(unsigned long long angle)
{
return degrees(static_cast<float>(angle));
}
////////////////////////////////////////////////////////////
constexpr Angle operator"" _rad(long double angle)
constexpr Angle operator""_rad(long double angle)
{
return radians(static_cast<float>(angle));
}
////////////////////////////////////////////////////////////
constexpr Angle operator"" _rad(unsigned long long angle)
constexpr Angle operator""_rad(unsigned long long angle)
{
return radians(static_cast<float>(angle));
}