diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-10-27 06:58:54 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-10-27 06:58:54 +0100 |
commit | c65bf0c5c25c554667aebce9f2d3183cd3af4357 (patch) | |
tree | a2b1debcb1687faed8c0d32622119f17531a8bb6 | |
parent | aaed56e93ddff39159f2d0b08d857a4a01a8184a (diff) |
fix clang warnings
-rw-r--r-- | options/value.hpp | 2 | ||||
-rw-r--r-- | tracker-aruco/ftnoir_tracker_aruco.cpp | 6 | ||||
-rw-r--r-- | tracker-steamvr/steamvr.cpp | 6 | ||||
-rw-r--r-- | x-plane-plugin/plugin.c | 6 |
4 files changed, 13 insertions, 7 deletions
diff --git a/options/value.hpp b/options/value.hpp index f16878ce..92e2878f 100644 --- a/options/value.hpp +++ b/options/value.hpp @@ -150,7 +150,7 @@ public: auto operator->() const noexcept { - return detail::dereference_wrapper{get()}; + return detail::dereference_wrapper<t>{get()}; } force_inline auto operator()() const noexcept { return get(); } diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp index 00340208..0cdf4c2c 100644 --- a/tracker-aruco/ftnoir_tracker_aruco.cpp +++ b/tracker-aruco/ftnoir_tracker_aruco.cpp @@ -553,9 +553,9 @@ void aruco_dialog::toggleCalibrate() auto [ pos, nvals ] = calibrator.get_estimate(); (void) nvals; - s.headpos_x = -pos(0); - s.headpos_y = -pos(1); - s.headpos_z = -pos(2); + s.headpos_x = (double)-pos(0); + s.headpos_y = (double)-pos(1); + s.headpos_z = (double)-pos(2); } } diff --git a/tracker-steamvr/steamvr.cpp b/tracker-steamvr/steamvr.cpp index 9a845d55..3bcfcc25 100644 --- a/tracker-steamvr/steamvr.cpp +++ b/tracker-steamvr/steamvr.cpp @@ -233,9 +233,9 @@ void steamvr::data(double* data) const auto& result = pose.mDeviceToAbsoluteTracking; - data[TX] = -result.m[0][3] * c; - data[TY] = result.m[1][3] * c; - data[TZ] = result.m[2][3] * c; + data[TX] = (double)(-result.m[0][3] * c); + data[TY] = (double)(result.m[1][3] * c); + data[TZ] = (double)(result.m[2][3] * c); matrix_to_euler(data[Yaw], data[Pitch], data[Roll], result); diff --git a/x-plane-plugin/plugin.c b/x-plane-plugin/plugin.c index b062bb02..e988313b 100644 --- a/x-plane-plugin/plugin.c +++ b/x-plane-plugin/plugin.c @@ -37,6 +37,12 @@ # define MAP_FAILED ((void*)-1) #endif +#ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wimplicit-float-conversion" +# pragma GCC diagnostic ignored "-Wdouble-promotion" +# pragma GCC diagnostic ignored "-Wlanguage-extension-token" +#endif + enum Axis { TX = 0, TY, TZ, Yaw, Pitch, Roll }; |