From: Martin Ling Date: Sun, 17 Aug 2014 10:44:05 +0000 (+0100) Subject: bindings: update for sr_output_options_{get,free} API change. X-Git-Tag: libsigrok-0.4.0~1146 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=70d3b20ba6189093c3a18473b3376644683f729d;p=libsigrok.git bindings: update for sr_output_options_{get,free} API change. --- diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index 67d49086..8e5874ca 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -1160,7 +1160,7 @@ void InputFileDevice::load() } Option::Option(const struct sr_option *structure, - shared_ptr structure_array) : + shared_ptr structure_array) : structure(structure), structure_array(structure_array) { @@ -1219,14 +1219,13 @@ string OutputFormat::get_description() map> OutputFormat::get_options() { - const struct sr_option *option = sr_output_options_get(structure); - auto option_array = shared_ptr( - option, [=](const struct sr_option *) { - sr_output_options_free(structure); }); + const struct sr_option **options = sr_output_options_get(structure); + auto option_array = shared_ptr( + options, sr_output_options_free); map> result; - for (; option->id; option++) - result[option->id] = shared_ptr