diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-26 09:53:08 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-26 09:56:09 +0100 |
commit | f432f7836a3ec2368260a51d352188e465d9c0cc (patch) | |
tree | 6e813389bb7192ebc44cbebbef595a3f8f0567da | |
parent | b7efdfe078804b9f0d67c509647b7a9f4dc6fa0a (diff) |
CLion pedantry
Fix few of the inspection warnings from CLion that
make any sense at all.
-rw-r--r-- | cv/video-property-page.hpp | 4 | ||||
-rw-r--r-- | logic/mappings.hpp | 2 | ||||
-rw-r--r-- | proto-ft/ftnoir_protocol_ft.cpp | 2 | ||||
-rw-r--r-- | spline/spline-widget.cpp | 2 | ||||
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt_dialog.cpp | 2 |
5 files changed, 4 insertions, 8 deletions
diff --git a/cv/video-property-page.hpp b/cv/video-property-page.hpp index b53993ef..4f356b2c 100644 --- a/cv/video-property-page.hpp +++ b/cv/video-property-page.hpp @@ -16,8 +16,4 @@ struct video_property_page final static bool show(int id); static bool show_from_capture(cv::VideoCapture& cap, int index); private: -#ifdef _WIN32 - static IBaseFilter* get_device(int id); - static cv::VideoCapture last_capture; -#endif }; diff --git a/logic/mappings.hpp b/logic/mappings.hpp index d08ae29c..f88e6820 100644 --- a/logic/mappings.hpp +++ b/logic/mappings.hpp @@ -34,7 +34,7 @@ public: Map& operator()(int i) { return axes[i]; } const Map& operator()(int i) const { return axes[i]; } Map& operator()(unsigned i) { return axes[i]; } - const Map& operator()(unsigned i) const { return axes[i]; } + const Map& operator()(unsigned i) const { return axes[i]; } template<typename f> void forall(f&& fun) { diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp index f8c5afb8..654cd3b1 100644 --- a/proto-ft/ftnoir_protocol_ft.cpp +++ b/proto-ft/ftnoir_protocol_ft.cpp @@ -33,7 +33,7 @@ never_inline void store(float volatile& place, const float value) union { float f32; - LONG i32 alignas(alignof(float)); + LONG i32; } value_; value_.f32 = value; diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp index c578d70d..b797a907 100644 --- a/spline/spline-widget.cpp +++ b/spline/spline-widget.cpp @@ -534,7 +534,7 @@ void spline_widget::show_tooltip(const QPoint& pos, const QPointF& value_) const bool is_fusion = QStringLiteral("fusion") == QApplication::style()->objectName(); const int add_x = (is_fusion ? 25 : 0), add_y = (is_fusion ? 15 : 0); - const QPoint pix(int(pos.x()) + add_x, int(pos.y()) + add_y); + const QPoint pix(pos.x() + add_x, pos.y() + add_y); QToolTip::showText(mapToGlobal(pix), QStringLiteral("value: %1x%2").arg(x, 0, 'f', 2).arg(y, 0, 'f', 2), diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp index 54a4f69b..10a2c6cb 100644 --- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp +++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp @@ -175,7 +175,7 @@ void TrackerDialog_PT::startstop_trans_calib(bool start) return tr("%1 pitch samples. Pitch more to %2 samples for stable calibration.") .arg(nsamples[1]).arg(min_pitch_samples); - const unsigned nsamples_total = nsamples[0] + nsamples[1]; + const int nsamples_total = nsamples[0] + nsamples[1]; return tr("%1 samples. Over %2, good!").arg(nsamples_total).arg(min_samples); ); |