X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=test%2Fimage_proxy_test.cc;h=210f32d408eddb17239e37bef9dc311645a8c555;hp=750b77561ad823fc8986831df8c75f56b6d417f5;hb=6d686ea45f5cd01a0d11f92a903ac77779ad8562;hpb=1d2a51bdc8315fa7283be329669860e435a1513f diff --git a/test/image_proxy_test.cc b/test/image_proxy_test.cc index 750b77561..210f32d40 100644 --- a/test/image_proxy_test.cc +++ b/test/image_proxy_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington + Copyright (C) 2020-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -25,6 +25,7 @@ #include +using std::make_shared; using std::shared_ptr; @@ -37,14 +38,14 @@ BOOST_AUTO_TEST_CASE (j2k_image_proxy_same_test) /* The files don't matter here, we just need some data to compare */ { - shared_ptr proxy1(new J2KImageProxy(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48)); - shared_ptr proxy2(new J2KImageProxy(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48)); + auto proxy1 = make_shared(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48); + auto proxy2 = make_shared(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48); BOOST_CHECK (proxy1->same(proxy2)); } { - shared_ptr proxy1(new J2KImageProxy(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48)); - shared_ptr proxy2(new J2KImageProxy(data_file1, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48)); + auto proxy1 = make_shared(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48); + auto proxy2 = make_shared(data_file1, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48); BOOST_CHECK (!proxy1->same(proxy2)); } } @@ -53,14 +54,14 @@ BOOST_AUTO_TEST_CASE (j2k_image_proxy_same_test) BOOST_AUTO_TEST_CASE (ffmpeg_image_proxy_same_test) { { - shared_ptr proxy1(new FFmpegImageProxy(data_file0, VideoRange::FULL)); - shared_ptr proxy2(new FFmpegImageProxy(data_file0, VideoRange::FULL)); + auto proxy1 = make_shared(data_file0); + auto proxy2 = make_shared(data_file0); BOOST_CHECK (proxy1->same(proxy2)); } { - shared_ptr proxy1(new FFmpegImageProxy(data_file0, VideoRange::FULL)); - shared_ptr proxy2(new FFmpegImageProxy(data_file1, VideoRange::FULL)); + auto proxy1 = make_shared(data_file0); + auto proxy2 = make_shared(data_file1); BOOST_CHECK (!proxy1->same(proxy2)); } }