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