projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
561eed2
)
Add list_to_vector().
author
Carl Hetherington
<cth@carlh.net>
Tue, 21 Apr 2020 21:32:05 +0000
(23:32 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 21 Apr 2020 21:34:02 +0000
(23:34 +0200)
src/lib/util.h
patch
|
blob
|
history
diff --git
a/src/lib/util.h
b/src/lib/util.h
index 12c79ea5a374cabe566d751e9f5c250db71b22ba..f8e9409f18d8f999c8b0d44e06fd615ec1f060a9 100644
(file)
--- a/
src/lib/util.h
+++ b/
src/lib/util.h
@@
-128,6
+128,17
@@
vector_to_list (std::vector<T> v)
return l;
}
+template <class T>
+std::vector<T>
+list_to_vector (std::list<T> v)
+{
+ std::vector<T> 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);