summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/module
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-06-26 22:25:22 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-06-26 23:05:21 +0200
commitd65936200a2756e6619a109fa6fa673b91df802e (patch)
tree80b6b6fc7ba9023cbe47290b8ae1bc5468a19bb1 /tracker-pt/module
parent4046773c41ee3c0f65840828ab983cfd13451c85 (diff)
modernize C++ syntax
No visible changes (hopefully).
Diffstat (limited to 'tracker-pt/module')
-rw-r--r--tracker-pt/module/camera.cpp6
-rw-r--r--tracker-pt/module/camera.h3
2 files changed, 4 insertions, 5 deletions
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>