summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-08-25 22:17:23 +0100
committerCarl Hetherington <cth@carlh.net>2015-08-25 22:17:23 +0100
commit1d68fe1e3ad1a9aa85fa7fc6071a0b8c64973953 (patch)
treecbad95204bf34c95ef2e6c6f5963eff00b81f140 /src/wx
parente386b94425586760374d8e1cb16be99af09cf07f (diff)
Purge rint() and use llrint and friends.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/film_viewer.cc6
-rw-r--r--src/wx/subtitle_panel.cc4
-rw-r--r--src/wx/timeline_time_axis_view.cc8
-rw-r--r--src/wx/wx_util.cc2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 9b648a8b9..b43db0d7b 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -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));
}
diff --git a/src/wx/subtitle_panel.cc b/src/wx/subtitle_panel.cc
index 3d6e5c8c3..d99b54558 100644
--- a/src/wx/subtitle_panel.cc
+++ b/src/wx/subtitle_panel.cc
@@ -173,9 +173,9 @@ SubtitlePanel::film_content_changed (int property)
} else if (property == SubtitleContentProperty::SUBTITLE_Y_OFFSET) {
checked_set (_y_offset, scs ? (scs->subtitle_y_offset() * 100) : 0);
} else if (property == SubtitleContentProperty::SUBTITLE_X_SCALE) {
- checked_set (_x_scale, scs ? int (rint (scs->subtitle_x_scale() * 100)) : 100);
+ checked_set (_x_scale, scs ? lrint (scs->subtitle_x_scale() * 100) : 100);
} else if (property == SubtitleContentProperty::SUBTITLE_Y_SCALE) {
- checked_set (_y_scale, scs ? int (rint (scs->subtitle_y_scale() * 100)) : 100);
+ checked_set (_y_scale, scs ? lrint (scs->subtitle_y_scale() * 100) : 100);
} else if (property == SubtitleContentProperty::SUBTITLE_LANGUAGE) {
checked_set (_language, scs ? scs->subtitle_language() : "");
}
diff --git a/src/wx/timeline_time_axis_view.cc b/src/wx/timeline_time_axis_view.cc
index 7882c1231..2667d9834 100644
--- a/src/wx/timeline_time_axis_view.cc
+++ b/src/wx/timeline_time_axis_view.cc
@@ -55,16 +55,16 @@ TimelineTimeAxisView::do_paint (wxGraphicsContext* gc)
double mark_interval = rint (128 / pps);
if (mark_interval > 5) {
- mark_interval -= int (rint (mark_interval)) % 5;
+ mark_interval -= lrint (mark_interval) % 5;
}
if (mark_interval > 10) {
- mark_interval -= int (rint (mark_interval)) % 10;
+ mark_interval -= lrint (mark_interval) % 10;
}
if (mark_interval > 60) {
- mark_interval -= int (rint (mark_interval)) % 60;
+ mark_interval -= lrint (mark_interval) % 60;
}
if (mark_interval > 3600) {
- mark_interval -= int (rint (mark_interval)) % 3600;
+ mark_interval -= lrint (mark_interval) % 3600;
}
if (mark_interval < 1) {
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 5acc2d6cd..3d37c373b 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -341,6 +341,6 @@ time_to_timecode (DCPTime t, double fps)
w -= m * 60;
int const s = floor (w);
w -= s;
- int const f = rint (w * fps);
+ int const f = lrint (w * fps);
return wxString::Format (wxT("%02d:%02d:%02d.%02d"), h, m, s, f);
}