summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/pt-api.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-08-18 13:52:05 +0200
committerStanislaw Halik <sthalik@misaki.pl>2021-08-18 13:53:47 +0200
commit721fa3ce414386e0da8da8529f60ba983812c1c3 (patch)
treeb52b79f5978901bcc3fac4cf14b6eda2b2e207fd /tracker-pt/pt-api.cpp
parenta7a03ee49fb567555d8a033a917cd48eecdc6a4e (diff)
tracker/pt: use braced-initializer-list
Diffstat (limited to 'tracker-pt/pt-api.cpp')
-rw-r--r--tracker-pt/pt-api.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tracker-pt/pt-api.cpp b/tracker-pt/pt-api.cpp
index f64d5c9a..6aeef7dc 100644
--- a/tracker-pt/pt-api.cpp
+++ b/tracker-pt/pt-api.cpp
@@ -40,13 +40,13 @@ f pt_point_extractor::threshold_radius_value(int w, int h, int threshold)
std::tuple<f, f> pt_pixel_pos_mixin::to_pixel_pos(f x, f y, int w, int h)
{
- return std::make_tuple(w*(x+f{.5}), f{.5}*(h - 2*y*w));
+ return { w*(x+f{.5}), f{.5}*(h - 2*y*w) };
}
std::tuple<f, f> pt_pixel_pos_mixin::to_screen_pos(f px, f py, int w, int h)
{
px *= w/(w-f{1}); py *= h/(h-f{1});
- return std::make_tuple((px - w/f{2})/w, -(py - h/f{2})/w);
+ return { (px - w/f{2})/w, -(py - h/f{2})/w };
}
pt_frame::pt_frame() = default;