summaryrefslogtreecommitdiffhomepage
path: root/logic/pipeline.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-07 08:21:02 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-07 08:21:02 +0100
commitb627bf2d913cd2f60a26462cd5e86a957a6ce508 (patch)
tree9c3badca765481794e3fe46c569ed5303580961b /logic/pipeline.cpp
parentf95a4641a37fba390487e53a7f57982e22266910 (diff)
logic/pipeline: fix clang-tidy warnings
Diffstat (limited to 'logic/pipeline.cpp')
-rw-r--r--logic/pipeline.cpp7
1 files changed, 3 insertions, 4 deletions
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;
}