X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Futil.h;h=f8e9409f18d8f999c8b0d44e06fd615ec1f060a9;hb=8f8730cadb3dae36e8aa7b7c732a7c162eac0fb6;hp=c8dcb29d6913c49ccef30bf92ee9393514824b91;hpb=f37e6b5a0f320d4352b87b97f78afae762512b93;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