From b627bf2d913cd2f60a26462cd5e86a957a6ce508 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 7 Dec 2018 08:21:02 +0100 Subject: logic/pipeline: fix clang-tidy warnings --- logic/pipeline.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'logic') diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp index 357b213c..64adf9c8 100644 --- a/logic/pipeline.cpp +++ b/logic/pipeline.cpp @@ -31,9 +31,6 @@ namespace pipeline_impl { -static constexpr inline double r2d = 180 / M_PI; -static constexpr inline double d2r = M_PI / 180; - reltrans::reltrans() = default; void reltrans::on_center() @@ -99,6 +96,8 @@ Pose reltrans::apply_pipeline(reltrans_state state, const Pose& value, // only when looking behind or downward if (in_zone) { + constexpr double d2r = M_PI / 180; + const rmat R = euler_to_rmat( euler_t(value(Yaw) * d2r * !disable(Yaw), value(Pitch) * d2r * !disable(Pitch), @@ -614,7 +613,7 @@ void bits::set(bit_flags flag, bool val) unsigned b_ = 0; for (;;) - if (b.compare_exchange_weak(b_, unsigned((b_ & ~flag_) | (flag_ * val_)))) + if (b.compare_exchange_weak(b_, (b_ & ~flag_) | (flag_ * val_))) break; } -- cgit v1.2.3