From f3c08d9a2669576078c926de91d0aa746cf2aa7d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 27 Apr 2025 15:51:03 +0100 Subject: Fix space between operator"" and its name Deprecated format in C++23, picked up by gcc-15 --- lib/maths.cpp | 4 ++-- lib/maths.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/maths.cpp b/lib/maths.cpp index 3a9bf9b..12e0681 100644 --- a/lib/maths.cpp +++ b/lib/maths.cpp @@ -32,13 +32,13 @@ static_assert(pow(3, 2) == 9); static_assert(pow(pi, 3) == 31.006278991699219F); float -operator"" _mph(const long double v) +operator""_mph(const long double v) { return static_cast(mph_to_ms(v)); } float -operator"" _kph(const long double v) +operator""_kph(const long double v) { return static_cast(kph_to_ms(v)); } diff --git a/lib/maths.h b/lib/maths.h index 0afce98..43d6dcd 100644 --- a/lib/maths.h +++ b/lib/maths.h @@ -504,11 +504,11 @@ kph_to_ms(T v) } // ... literals are handy for now, probably go away when we load stuff externally -float operator"" _mph(const long double v); -float operator"" _kph(const long double v); +float operator""_mph(const long double v); +float operator""_kph(const long double v); constexpr float -operator"" _degrees(long double degrees) +operator""_degrees(long double degrees) { return static_cast(degrees) * degreesToRads; } -- cgit v1.2.3