summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-05-20 22:51:49 +0200
committerCarl Hetherington <cth@carlh.net>2024-05-06 20:42:50 +0200
commita3fcbb3a76e079a5485a0552ea5d35b8d6739116 (patch)
tree58f6476b7197c0e32b5aa3d52d0859a9b04db268 /src/lib/util.cc
parenta4105c6e8dc83407abc9b12e80c958673c942888 (diff)
Use sqlite for cinema and DKDM recipient lists.
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 2f5c1ce49..282011d65 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -89,10 +89,11 @@ LIBDCP_ENABLE_WARNINGS
#include <dbghelp.h>
#endif
#include <signal.h>
+#include <climits>
#include <iomanip>
#include <iostream>
#include <fstream>
-#include <climits>
+#include <numeric>
#include <stdexcept>
#ifdef DCPOMATIC_POSIX
#include <execinfo.h>
@@ -121,9 +122,6 @@ using std::vector;
using std::wstring;
using boost::thread;
using boost::optional;
-using boost::lexical_cast;
-using boost::bad_lexical_cast;
-using boost::scoped_array;
using dcp::Size;
using dcp::raw_convert;
using dcp::locale_convert;
@@ -1151,6 +1149,7 @@ setup_grok_library_path()
}
#endif
+
string
screen_names_to_string(vector<string> names)
{
@@ -1185,3 +1184,16 @@ report_problem()
return String::compose(_("Please report this problem by using Help -> Report a problem or via email to %1"), variant::report_problem_email());
}
+
+string
+join_strings(vector<string> const& in, string const& separator)
+{
+ if (in.empty()) {
+ return {};
+ }
+
+ return std::accumulate(std::next(in.begin()), in.end(), in.front(), [separator](string a, string b) {
+ return a + separator + b;
+ });
+}
+