From d0a3b0a85c50c7c746b8ef17af19f4e88dfdf895 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 26 Sep 2021 10:00:53 +0200 Subject: tracker/{pt,wii}: fix awkward pt_preview::operator= --- tracker-wii/wii_frame.cpp | 7 +------ tracker-wii/wii_frame.hpp | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'tracker-wii') diff --git a/tracker-wii/wii_frame.cpp b/tracker-wii/wii_frame.cpp index 8f18f4b8..fcde5235 100644 --- a/tracker-wii/wii_frame.cpp +++ b/tracker-wii/wii_frame.cpp @@ -17,7 +17,7 @@ using namespace pt_module; -WIIPreview& WIIPreview::operator=(const pt_frame& frame_) +void WIIPreview::set_last_frame(const pt_frame& frame_) { const struct wii_info& wii = frame_.as_const()->wii; const cv::Mat& frame = frame_.as_const()->mat; @@ -25,18 +25,13 @@ WIIPreview& WIIPreview::operator=(const pt_frame& frame_) status = wii.status; if (frame.channels() != 3) - { eval_once(qDebug() << "tracker/pt: camera frame depth: 3 !=" << frame.channels()); - return *this; - } const bool need_resize = frame.cols != frame_out.cols || frame.rows != frame_out.rows; if (need_resize) cv::resize(frame, frame_copy, cv::Size(frame_out.cols, frame_out.rows), 0, 0, cv::INTER_NEAREST); else frame.copyTo(frame_copy); - - return *this; } WIIPreview::WIIPreview(int w, int h) diff --git a/tracker-wii/wii_frame.hpp b/tracker-wii/wii_frame.hpp index 5d6dd199..a7688b80 100644 --- a/tracker-wii/wii_frame.hpp +++ b/tracker-wii/wii_frame.hpp @@ -47,7 +47,7 @@ struct WIIPreview final : pt_preview { WIIPreview(int w, int h); - WIIPreview& operator=(const pt_frame& frame) override; + void set_last_frame(const pt_frame& frame) override; QImage get_bitmap() override; void draw_head_center(f x, f y) override; -- cgit v1.2.3