From 1761550c076b6e576dcaa18e7ca4c4869d5eaa98 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 11 Feb 2025 02:34:03 +0100 Subject: Fix/hack build to work again on Ubuntu 1{6,8}.04 --- src/lib/create_cli.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(value); }; + std::function (string s)> string_to_int = [](string s) { + return boost::optional(dcp::raw_convert(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 (string)> convert_channel = [](string channel) -> optional{ if (channel == "L") { -- cgit v1.2.3