Purge rint() and use llrint and friends.
[dcpomatic.git] / src / wx / film_viewer.cc
index 9b648a8b970ed28c3fb031a72e70d9b18d8ef237..b43db0d7b04867d52f560e63d11bce06e8f21c4c 100644 (file)
@@ -316,11 +316,11 @@ FilmViewer::calculate_sizes ()
        if (panel_ratio < film_ratio) {
                /* panel is less widscreen than the film; clamp width */
                _out_size.width = _panel_size.width;
-               _out_size.height = rint (_out_size.width / film_ratio);
+               _out_size.height = lrintf (_out_size.width / film_ratio);
        } else {
                /* panel is more widescreen than the film; clamp height */
                _out_size.height = _panel_size.height;
-               _out_size.width = rint (_out_size.height * film_ratio);
+               _out_size.width = lrintf (_out_size.height * film_ratio);
        }
 
        /* Catch silly values */
@@ -379,7 +379,7 @@ FilmViewer::update_position_label ()
 
        double const fps = _film->video_frame_rate ();
        /* Count frame number from 1 ... not sure if this is the best idea */
-       _frame_number->SetLabel (wxString::Format (wxT("%d"), int (rint (_position.seconds() * fps)) + 1));
+       _frame_number->SetLabel (wxString::Format (wxT("%d"), lrint (_position.seconds() * fps) + 1));
        _timecode->SetLabel (time_to_timecode (_position, fps));
 }