From 7f5a036750d30db466f23bb5fdaa28173bafe28d Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Sun, 24 Aug 2014 20:11:35 +0100 Subject: [PATCH] C++: Update InputFormat::get_options for latest version of input API. --- bindings/cxx/classes.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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