summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-02-11 02:34:03 +0100
committerCarl Hetherington <cth@carlh.net>2025-02-11 02:34:03 +0100
commit1761550c076b6e576dcaa18e7ca4c4869d5eaa98 (patch)
tree652d0a0755886f5877c2fe45e22d1454f8a1f59e
parent9d528ae478bbb3aba2bfca224c1a7a2ba7974a58 (diff)
Fix/hack build to work again on Ubuntu 1{6,8}.04
-rw-r--r--src/lib/create_cli.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/create_cli.cc b/src/lib/create_cli.cc
index f726aa0ae..c2b5e210a 100644
--- a/src/lib/create_cli.cc
+++ b/src/lib/create_cli.cc
@@ -217,6 +217,10 @@ CreateCLI::CreateCLI (int argc, char* argv[])
return boost::optional<int>(value);
};
+ std::function<optional<int> (string s)> string_to_int = [](string s) {
+ return boost::optional<int>(dcp::raw_convert<int>(s));
+ };
+
argument_option(i, argc, argv, "-n", "--name", &claimed, &error, &_name);
argument_option(i, argc, argv, "-t", "--template", &claimed, &error, &template_name_string);
/* See comment below about --cpl */
@@ -229,7 +233,8 @@ CreateCLI::CreateCLI (int argc, char* argv[])
argument_option(i, argc, argv, "", "--config", &claimed, &error, &config_dir, string_to_path);
argument_option(i, argc, argv, "-o", "--output", &claimed, &error, &output_dir, string_to_path);
argument_option(i, argc, argv, "", "--video-bit-rate", &claimed, &error, &video_bit_rate_int);
- argument_option(i, argc, argv, "-a", "--audio-channels", &claimed, &error, &audio_channels);
+ /* Similar to below, not using string_to_int here causes on add compile error on Ubuntu 1{6,8}.04 */
+ argument_option(i, argc, argv, "-a", "--audio-channels", &claimed, &error, &audio_channels, string_to_int);
std::function<optional<dcp::Channel> (string)> convert_channel = [](string channel) -> optional<dcp::Channel>{
if (channel == "L") {