summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/module/camera.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-24 18:54:34 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-24 19:32:10 +0100
commita88e34b21b07f70123926fcb5c505d6afdf99807 (patch)
tree905059194dcc64c7c163b8912947d8173fd4cc91 /tracker-pt/module/camera.cpp
parent5bf85412e4eacf92acc936b6e74bce0e2b1055d9 (diff)
style/quality only
No functional changes. - add `override' everywhere where missing - almost pass clang's `-Wweak-vtables' - avoid some float/double conversions - remove unused private members - make signedness conversions explicit - put stuff in right namespaces to aid analysis
Diffstat (limited to 'tracker-pt/module/camera.cpp')
-rw-r--r--tracker-pt/module/camera.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tracker-pt/module/camera.cpp b/tracker-pt/module/camera.cpp
index 85439431..1b948932 100644
--- a/tracker-pt/module/camera.cpp
+++ b/tracker-pt/module/camera.cpp
@@ -19,6 +19,7 @@
#include <cstdlib>
using namespace pt_module;
+namespace pt_module {
Camera::Camera(const QString& module_name) : s { module_name }
{
@@ -141,10 +142,10 @@ bool Camera::start(int idx, int fps, int res_x, int res_y)
void Camera::stop()
{
cap = nullptr;
- desired_name = QString();
- active_name = QString();
- cam_info = pt_camera_info();
- cam_desired = pt_camera_info();
+ desired_name = QString{};
+ active_name = QString{};
+ cam_info = {};
+ cam_desired = {};
}
bool Camera::get_frame_(cv::Mat& frame)
@@ -171,3 +172,4 @@ void Camera::camera_deleter::operator()(cv::VideoCapture* cap)
}
}
+} // ns pt_module