From b03f2277a205ff7e7cdaa12c6e52322ea474a7af Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 30 Dec 2024 15:43:14 +0100 Subject: Bump libdcp for raw_convert changes. raw_convert is gone, so here we use fmt::{to_string,format} instead. Other raw_converts now use fast_float. --- src/lib/create_cli.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/lib/create_cli.cc') diff --git a/src/lib/create_cli.cc b/src/lib/create_cli.cc index 3fb978f7c..10196199a 100644 --- a/src/lib/create_cli.cc +++ b/src/lib/create_cli.cc @@ -28,6 +28,7 @@ #include "ratio.h" #include "variant.h" #include +#include #include #include @@ -88,6 +89,25 @@ argument_option (int& n, int argc, char* argv[], string short_name, string long_ } +template <> +void +argument_option(int& n, int argc, char* argv[], string short_name, string long_name, bool* claimed, optional* error, string* out) +{ + string const a = argv[n]; + if (a != short_name && a != long_name) { + return; + } + + if ((n + 1) >= argc) { + **error = String::compose("%1: option %2 requires an argument", argv[0], long_name); + return; + } + + *out = string(argv[++n]); + *claimed = true; +} + + template void argument_option ( -- cgit v1.2.3