X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Futil.h;h=f8e9409f18d8f999c8b0d44e06fd615ec1f060a9;hb=4b7185e4eda53534c4d71a1f31ba33ca3dd8dc8d;hp=c8dcb29d6913c49ccef30bf92ee9393514824b91;hpb=dfd42d2a546d14c32057a34002543877ea2f99cb;p=dcpomatic.git diff --git a/src/lib/util.h b/src/lib/util.h index c8dcb29d6..f8e9409f1 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2019 Carl Hetherington + Copyright (C) 2012-2020 Carl Hetherington This file is part of DCP-o-matic. @@ -128,4 +128,18 @@ vector_to_list (std::vector v) return l; } +template +std::vector +list_to_vector (std::list v) +{ + std::vector l; + BOOST_FOREACH (T& i, v) { + l.push_back (i); + } + return l; +} + +extern double db_to_linear (double db); +extern double linear_to_db (double linear); + #endif