From: Martin Ling Date: Sun, 24 Aug 2014 19:11:35 +0000 (+0100) Subject: C++: Update InputFormat::get_options for latest version of input API. X-Git-Tag: libsigrok-0.4.0~1095 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=7f5a036750d30db466f23bb5fdaa28173bafe28d C++: Update InputFormat::get_options for latest version of input API. --- diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index ed89b8bd..ce458eeb 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -1130,14 +1130,13 @@ string InputFormat::get_description() map> InputFormat::get_options() { - const struct sr_option *option = sr_input_options_get(structure); - auto option_array = shared_ptr( - option, [=](const struct sr_option *) { - sr_input_options_free(structure); }); + const struct sr_option **options = sr_input_options_get(structure); + auto option_array = shared_ptr( + options, sr_input_options_free); map> result; - for (; option->id; option++) - result[option->id] = shared_ptr