From: Carl Hetherington Date: Tue, 21 Apr 2020 21:32:05 +0000 (+0200) Subject: Add list_to_vector(). X-Git-Tag: v2.15.53~1^2~2 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=f5980767b7d1d9b39186dd13f12b9d8297a87aef;p=dcpomatic.git Add list_to_vector(). --- diff --git a/src/lib/util.h b/src/lib/util.h index 12c79ea5a..f8e9409f1 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -128,6 +128,17 @@ 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);