Tidying.
authorCarl Hetherington <cth@carlh.net>
Thu, 5 May 2022 13:35:03 +0000 (15:35 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 5 May 2022 19:09:40 +0000 (21:09 +0200)
test/gamma_transfer_function_test.cc
test/rgb_xyz_test.cc

index 993f4e9bec2ff6f5259b09700ca325ffb2acb0cd..6e454b764676bdc382f640759f14b96baeb5f21b 100644 (file)
     files in the program, then also delete it here.
 */
 
+
 #include "gamma_transfer_function.h"
 #include "modified_gamma_transfer_function.h"
 #include <boost/test/unit_test.hpp>
 
+
+using std::make_shared;
 using std::shared_ptr;
 
+
 /** Check GammaTransferFunction::about_equal */
 BOOST_AUTO_TEST_CASE (gamma_transfer_function_test)
 {
-       shared_ptr<dcp::GammaTransferFunction> a (new dcp::GammaTransferFunction (1.2));
-       shared_ptr<dcp::GammaTransferFunction> b (new dcp::GammaTransferFunction (1.2));
+       auto a = make_shared<dcp::GammaTransferFunction>(1.2);
+       auto b = make_shared<dcp::GammaTransferFunction>(1.2);
        BOOST_CHECK (a->about_equal (b, 1e-6));
 
-       a.reset (new dcp::GammaTransferFunction (1.2));
-       a.reset (new dcp::GammaTransferFunction (1.3));
+       a = make_shared<dcp::GammaTransferFunction>(1.3);
        BOOST_CHECK (a->about_equal (b, 0.2));
        BOOST_CHECK (!a->about_equal (b, 0.05));
 
-       shared_ptr<dcp::ModifiedGammaTransferFunction> c (new dcp::ModifiedGammaTransferFunction (2.4, 0.05, 1, 2));
+       auto c = make_shared<dcp::ModifiedGammaTransferFunction>(2.4, 0.05, 1, 2);
        BOOST_CHECK (!a->about_equal (c, 1));
 }
index 3e359c0cbdaa3b83e76a57bc19bce83065bc4e99..8fd478b148fe8822ddf4da94b73506afed57ac9d 100644 (file)
     files in the program, then also delete it here.
 */
 
+
 #include "rgb_xyz.h"
 #include "openjpeg_image.h"
 #include "colour_conversion.h"
 #include "stream_operators.h"
-#include <boost/test/unit_test.hpp>
 #include <boost/bind.hpp>
+#include <boost/random.hpp>
 #include <boost/scoped_array.hpp>
+#include <boost/test/unit_test.hpp>
+
 
-using std::max;
-using std::list;
-using std::string;
 using std::cout;
-using std::shared_ptr;
+using std::list;
 using std::make_shared;
+using std::max;
+using std::shared_ptr;
+using std::string;
 using boost::optional;
 using boost::scoped_array;