drv_hrt: remove whitespace for operator ""

Fixes the clang error:
/__w/PX4-Autopilot/PX4-Autopilot/src/drivers/drv_hrt.h:297:35: fatal error: identifier '_s' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
  297 | constexpr hrt_abstime operator "" _s(unsigned long long seconds)
This commit is contained in:
Beat Küng
2023-08-28 17:48:20 +02:00
parent ecbc5b83a0
commit b485b1a12a
+3 -3
View File
@@ -294,17 +294,17 @@ namespace time_literals
// User-defined integer literals for different time units. // User-defined integer literals for different time units.
// The base unit is hrt_abstime in microseconds // The base unit is hrt_abstime in microseconds
constexpr hrt_abstime operator "" _s(unsigned long long seconds) constexpr hrt_abstime operator ""_s(unsigned long long seconds)
{ {
return hrt_abstime(seconds * 1000000ULL); return hrt_abstime(seconds * 1000000ULL);
} }
constexpr hrt_abstime operator "" _ms(unsigned long long milliseconds) constexpr hrt_abstime operator ""_ms(unsigned long long milliseconds)
{ {
return hrt_abstime(milliseconds * 1000ULL); return hrt_abstime(milliseconds * 1000ULL);
} }
constexpr hrt_abstime operator "" _us(unsigned long long microseconds) constexpr hrt_abstime operator ""_us(unsigned long long microseconds)
{ {
return hrt_abstime(microseconds); return hrt_abstime(microseconds);
} }