From ad7244de981a7dd0b9b4f8f3d62d4704f1968012 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 5 May 2022 20:31:26 +0200 Subject: Use std::vector for LUTs. --- src/transfer_function.cc | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'src/transfer_function.cc') diff --git a/src/transfer_function.cc b/src/transfer_function.cc index 00968e2f..dd3512ec 100644 --- a/src/transfer_function.cc +++ b/src/transfer_function.cc @@ -41,27 +41,16 @@ #include -using std::pow; +using std::make_pair; using std::map; using std::pair; -using std::make_pair; +using std::pow; using std::shared_ptr; +using std::vector; using namespace dcp; -TransferFunction::~TransferFunction () -{ - boost::mutex::scoped_lock lm (_mutex); - - for (auto const& i: _luts) { - delete[] i.second; - } - - _luts.clear (); -} - - -double const * +vector const& TransferFunction::lut (int bit_depth, bool inverse) const { boost::mutex::scoped_lock lm (_mutex); -- cgit v1.2.3