X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fidentity_transfer_function.cc;h=c01e6698af19f05952c6d10cf2a1d593fa3aab36;hb=cf4e4272f72346c39964b128f78b2297f04dba55;hp=1edc61da8085f4906ebdbf389c3bf87b85f5f9cd;hpb=028a6d7a5939b114472f16c3436a30f72165165f;p=libdcp.git diff --git a/src/identity_transfer_function.cc b/src/identity_transfer_function.cc index 1edc61da..c01e6698 100644 --- a/src/identity_transfer_function.cc +++ b/src/identity_transfer_function.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2016 Carl Hetherington + Copyright (C) 2016-2021 Carl Hetherington This file is part of libdcp. @@ -31,23 +31,27 @@ files in the program, then also delete it here. */ + /** @file src/identity_transfer_function.cc - * @brief IdentityTransferFunction class. + * @brief IdentityTransferFunction class */ + #include "identity_transfer_function.h" #include + using std::pow; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using namespace dcp; + double * IdentityTransferFunction::make_lut (int bit_depth, bool) const { int const bit_length = int(std::pow(2.0f, bit_depth)); - double* lut = new double[bit_length]; + auto lut = new double[bit_length]; for (int i = 0; i < bit_length; ++i) { lut[i] = double(i) / (bit_length - 1); } @@ -55,9 +59,10 @@ IdentityTransferFunction::make_lut (int bit_depth, bool) const return lut; } + bool IdentityTransferFunction::about_equal (shared_ptr other, double) const { - shared_ptr o = dynamic_pointer_cast (other); + auto o = dynamic_pointer_cast(other); return static_cast(o); }