X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fprop%2Fbinding%2Fdecoderoptions.cpp;h=0e44386eafa546781244af06bdfe33d004b4e770;hb=f9abf97e78bc4825d80926b0ebc6cbaef40768b1;hp=d9904852ca645e21f6b4b4d447a200860e301d94;hpb=182d2f5dbe8b631b24949e5b111762009d1eeefa;p=pulseview.git diff --git a/pv/prop/binding/decoderoptions.cpp b/pv/prop/binding/decoderoptions.cpp index d990485..0e44386 100644 --- a/pv/prop/binding/decoderoptions.cpp +++ b/pv/prop/binding/decoderoptions.cpp @@ -23,21 +23,21 @@ #include "decoderoptions.h" #include -#include #include #include #include +#include #include #include #include using boost::bind; using boost::none; -using boost::shared_ptr; using std::make_pair; using std::map; using std::pair; +using std::shared_ptr; using std::string; using std::vector; @@ -72,6 +72,9 @@ DecoderOptions::DecoderOptions( if (opt->values) prop = bind_enum(name, opt, getter, setter); + else if (g_variant_is_of_type(opt->def, G_VARIANT_TYPE("d"))) + prop = shared_ptr(new Double(name, 2, "", + none, none, getter, setter)); else if (g_variant_is_of_type(opt->def, G_VARIANT_TYPE("x"))) prop = shared_ptr( new Int(name, "", none, getter, setter)); @@ -107,7 +110,7 @@ GVariant* DecoderOptions::getter(const char *id) // Get the value from the hash table if it is already present const map& options = _decoder->options(); - map::const_iterator iter = options.find(id); + const auto iter = options.find(id); if (iter != options.end()) val = (*iter).second;