diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 22:25:22 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 23:05:21 +0200 |
commit | d65936200a2756e6619a109fa6fa673b91df802e (patch) | |
tree | 80b6b6fc7ba9023cbe47290b8ae1bc5468a19bb1 /tracker-pt | |
parent | 4046773c41ee3c0f65840828ab983cfd13451c85 (diff) |
modernize C++ syntax
No visible changes (hopefully).
Diffstat (limited to 'tracker-pt')
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt_dialog.cpp | 2 | ||||
-rw-r--r-- | tracker-pt/module/camera.cpp | 6 | ||||
-rw-r--r-- | tracker-pt/module/camera.h | 3 | ||||
-rw-r--r-- | tracker-pt/pt-api.hpp | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp index ce1b9eb0..01ae83c9 100644 --- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp +++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp @@ -265,7 +265,7 @@ void TrackerDialog_PT::register_tracker(ITracker *t) void TrackerDialog_PT::unregister_tracker() { - tracker = NULL; + tracker = nullptr; ui.tcalib_button->setEnabled(false); poll_tracker_info(); timer.stop(); diff --git a/tracker-pt/module/camera.cpp b/tracker-pt/module/camera.cpp index 9c62e8a3..816a2484 100644 --- a/tracker-pt/module/camera.cpp +++ b/tracker-pt/module/camera.cpp @@ -16,6 +16,8 @@ #include "cv/video-property-page.hpp" +#include <cstdlib> + using namespace pt_module; Camera::Camera(const QString& module_name) : s { module_name } @@ -75,10 +77,10 @@ Camera::result Camera::get_frame(pt_frame& frame_) cam_info.res_y = frame.rows; cam_info.fov = fov; - return result(true, cam_info); + return { true, cam_info }; } else - return result(false, pt_camera_info()); + return { false, {} }; } bool Camera::start(int idx, int fps, int res_x, int res_y) diff --git a/tracker-pt/module/camera.h b/tracker-pt/module/camera.h index 05ca93dd..f3f88cc5 100644 --- a/tracker-pt/module/camera.h +++ b/tracker-pt/module/camera.h @@ -8,12 +8,9 @@ #pragma once #include "pt-api.hpp" - #include "compat/timer.hpp" -#include <functional> #include <memory> -#include <tuple> #include <opencv2/core.hpp> #include <opencv2/videoio.hpp> diff --git a/tracker-pt/pt-api.hpp b/tracker-pt/pt-api.hpp index 0ddfb4e1..a0d9a806 100644 --- a/tracker-pt/pt-api.hpp +++ b/tracker-pt/pt-api.hpp @@ -15,7 +15,7 @@ struct pt_camera_info final { - typedef typename types::f f; + using f = typename types::f; pt_camera_info(); static double get_focal_length(f fov, int res_x, int res_y); |