diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-05-13 13:19:31 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-05-13 13:19:31 +0200 |
commit | 74d9f5e31428ef362033a63c10b781d943c5e5a5 (patch) | |
tree | 71e11ed620fa1d76577df07846e910970fe9210b /tracker-pt/camera.cpp | |
parent | 41a92ea7401c89c5696b3e1b2fa239458a92ff73 (diff) |
many: remove unneeded implicit type conversion double <-> float
Diffstat (limited to 'tracker-pt/camera.cpp')
-rw-r--r-- | tracker-pt/camera.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp index 600ab26a..c995c11b 100644 --- a/tracker-pt/camera.cpp +++ b/tracker-pt/camera.cpp @@ -57,12 +57,12 @@ bool Camera::get_frame(float dt, cv::Mat* frame) { bool new_frame = _get_frame(frame); // measure fps of valid frames - const float dt_smoothing_const = 0.95; + constexpr float dt_smoothing_const = 0.95; dt_valid += dt; if (new_frame) { - dt_mean = dt_smoothing_const * dt_mean + (1.0 - dt_smoothing_const) * dt_valid; - cam_info.fps = dt_mean > 1e-3 ? 1.0 / dt_mean : 0; + dt_mean = dt_smoothing_const * dt_mean + (1 - dt_smoothing_const) * dt_valid; + cam_info.fps = dt_mean > 1e-3f ? 1 / dt_mean : 0; dt_valid = 0; } else |