diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-24 22:56:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-24 22:56:33 +0100 |
| commit | e1e7de8d73bedd0c741e7df0390068c67867e09f (patch) | |
| tree | 02f007aad80f4d99707f2507a81b0685865026d0 /src/transfer_function.cc | |
| parent | ceaf7bc52712cb60708ed5eb5c62c5e463dd8e89 (diff) | |
Tidying.
Diffstat (limited to 'src/transfer_function.cc')
| -rw-r--r-- | src/transfer_function.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/transfer_function.cc b/src/transfer_function.cc index 8746c828..00968e2f 100644 --- a/src/transfer_function.cc +++ b/src/transfer_function.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -31,9 +31,16 @@ files in the program, then also delete it here. */ + +/* @file src/transfer_function.cc + * @brief TransferFunction + */ + + #include "transfer_function.h" #include <cmath> + using std::pow; using std::map; using std::pair; @@ -41,23 +48,25 @@ using std::make_pair; using std::shared_ptr; using namespace dcp; + TransferFunction::~TransferFunction () { boost::mutex::scoped_lock lm (_mutex); - for (map<pair<int, bool>, double*>::const_iterator i = _luts.begin(); i != _luts.end(); ++i) { - delete[] i->second; + for (auto const& i: _luts) { + delete[] i.second; } _luts.clear (); } + double const * TransferFunction::lut (int bit_depth, bool inverse) const { boost::mutex::scoped_lock lm (_mutex); - map<pair<int, bool>, double*>::const_iterator i = _luts.find (make_pair (bit_depth, inverse)); + auto i = _luts.find (make_pair (bit_depth, inverse)); if (i != _luts.end ()) { return i->second; } |
