mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:08:53 +08:00
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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user