diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-12-20 23:37:57 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-12-20 23:37:57 +0000 |
| commit | 4dbc6ef917aeceb906b1ef1caf6911033e7e2c54 (patch) | |
| tree | 203675d00d5cc004be6205218f835b6d7a10e925 /src/lib/video_content.cc | |
| parent | ab32f60c2c9f2ad01dc8d96dc375df256dba0c41 (diff) | |
Hand-apply d849d411cff28ef5453085791d0b4d7cd73bd070 from master; replace all assert()s with thrown exceptions.
Diffstat (limited to 'src/lib/video_content.cc')
| -rw-r--r-- | src/lib/video_content.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 1da5d87c1..c50d466a1 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -136,7 +136,7 @@ VideoContent::VideoContent (shared_ptr<const Film> f, vector<shared_ptr<Content> , _video_length (0) { shared_ptr<VideoContent> ref = dynamic_pointer_cast<VideoContent> (c[0]); - assert (ref); + DCPOMATIC_ASSERT (ref); for (size_t i = 0; i < c.size(); ++i) { shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (c[i]); @@ -240,7 +240,7 @@ VideoContent::take_from_video_examiner (shared_ptr<VideoExaminer> d) } shared_ptr<const Film> film = _film.lock (); - assert (film); + DCPOMATIC_ASSERT (film); LOG_GENERAL ("Video length obtained from header as %1 frames", _video_length.frames (_video_frame_rate)); signal_changed (VideoContentProperty::VIDEO_SIZE); @@ -413,7 +413,7 @@ VideoContent::video_size_after_3d_split () const return dcp::Size (s.width, s.height / 2); } - assert (false); + DCPOMATIC_ASSERT (false); } void @@ -474,7 +474,7 @@ ContentTime VideoContent::dcp_time_to_content_time (DCPTime t) const { shared_ptr<const Film> film = _film.lock (); - assert (film); + DCPOMATIC_ASSERT (film); return ContentTime (t, FrameRateChange (video_frame_rate(), film->video_frame_rate())); } @@ -482,7 +482,7 @@ void VideoContent::scale_and_crop_to_fit_width () { shared_ptr<const Film> film = _film.lock (); - assert (film); + DCPOMATIC_ASSERT (film); set_scale (VideoContentScale (film->container ())); @@ -495,7 +495,7 @@ void VideoContent::scale_and_crop_to_fit_height () { shared_ptr<const Film> film = _film.lock (); - assert (film); + DCPOMATIC_ASSERT (film); set_scale (VideoContentScale (film->container ())); @@ -522,7 +522,7 @@ VideoContent::set_video_frame_rate (float r) optional<float> VideoContent::fade (VideoFrame f) const { - assert (f >= 0); + DCPOMATIC_ASSERT (f >= 0); if (f < fade_in().frames (video_frame_rate ())) { return float (f) / _fade_in.frames (video_frame_rate ()); @@ -563,7 +563,7 @@ VideoContent::processing_description () const } shared_ptr<const Film> film = _film.lock (); - assert (film); + DCPOMATIC_ASSERT (film); dcp::Size const container_size = film->frame_size (); dcp::Size const scaled = scale().size (dynamic_pointer_cast<const VideoContent> (shared_from_this ()), container_size, container_size, 1); |
