summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-03-19 05:41:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-03-19 05:41:08 +0100
commitca1b49d0b181b0f7526f7b8d97ae4c24a85654ed (patch)
treea12bf657203842abf312c78f95e31446e02ae325 /tracker-pt
parentb877020ab416e691e5681bd31ddcda373418678b (diff)
tracker/pt: modernize some loops
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-pt/module/point_extractor.cpp4
-rw-r--r--tracker-pt/point_tracker.cpp4
2 files changed, 3 insertions, 5 deletions
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp
index 2cb5db97..1a75a3e3 100644
--- a/tracker-pt/module/point_extractor.cpp
+++ b/tracker-pt/module/point_extractor.cpp
@@ -88,8 +88,8 @@ PointExtractor::PointExtractor(const QString& module_name) : s(module_name)
void PointExtractor::ensure_channel_buffers(const cv::Mat& orig_frame)
{
if (ch[0].rows != orig_frame.rows || ch[0].cols != orig_frame.cols)
- for (unsigned k = 0; k < 3; k++) // NOLINT(modernize-loop-convert)
- ch[k] = cv::Mat1b(orig_frame.rows, orig_frame.cols);
+ for (cv::Mat1b& x : ch)
+ x = cv::Mat1b(orig_frame.rows, orig_frame.cols);
}
void PointExtractor::ensure_buffers(const cv::Mat& frame)
diff --git a/tracker-pt/point_tracker.cpp b/tracker-pt/point_tracker.cpp
index a1d27ede..e209938f 100644
--- a/tracker-pt/point_tracker.cpp
+++ b/tracker-pt/point_tracker.cpp
@@ -102,9 +102,7 @@ PointTracker::PointOrder PointTracker::find_correspondences_previous(const vec2*
constexpr unsigned sz = PointModel::N_POINTS;
// set correspondences by minimum distance to projected model point
- bool point_taken[sz];
- for (unsigned i=0; i < sz; ++i) // NOLINT(modernize-loop-convert)
- point_taken[i] = false;
+ bool point_taken[sz] {};
for (unsigned i=0; i < sz; ++i)
{