Improved comments.
[libdcp.git] / src / transfer_function.cc
index ea71818eb2a2bac10d98290bf78b625facd3b4e0..00968e2f633a1651a43f4e1d50147349f183a7a2 100644 (file)
@@ -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.
 
     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;
 using std::make_pair;
-using boost::shared_ptr;
+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;
        }