From f5980767b7d1d9b39186dd13f12b9d8297a87aef Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 21 Apr 2020 23:32:05 +0200 Subject: [PATCH] Add list_to_vector(). --- src/lib/util.h | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); -- 2.30.2