From: Martin Ling Date: Tue, 2 Sep 2014 19:01:35 +0000 (+0100) Subject: C++: Don't spell out arguments to StructureWrapper when not required. X-Git-Tag: libsigrok-0.4.0~1049 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ba4eac48d4c7277d8b7cbe4036fb64610b8e6c61;p=libsigrok.git C++: Don't spell out arguments to StructureWrapper when not required. --- diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index c90cac3f..55eba8e4 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -248,7 +248,7 @@ shared_ptr Context::open_stream(string header) } Driver::Driver(struct sr_dev_driver *structure) : - StructureWrapper(structure), + StructureWrapper(structure), initialized(false) { } @@ -475,7 +475,7 @@ shared_ptr HardwareDevice::get_driver() } Channel::Channel(struct sr_channel *structure) : - StructureWrapper(structure), + StructureWrapper(structure), type(ChannelType::get(structure->type)) { } @@ -516,7 +516,7 @@ unsigned int Channel::get_index() ChannelGroup::ChannelGroup(Device *device, struct sr_channel_group *structure) : - StructureWrapper(structure), + StructureWrapper(structure), Configurable(device->structure->driver, device->structure, structure) { for (GSList *entry = structure->channels; entry; entry = entry->next) @@ -579,7 +579,7 @@ shared_ptr Trigger::add_stage() } TriggerStage::TriggerStage(struct sr_trigger_stage *structure) : - StructureWrapper(structure) + StructureWrapper(structure) { } @@ -616,7 +616,7 @@ void TriggerStage::add_match(shared_ptr channel, const TriggerMatchType } TriggerMatch::TriggerMatch(struct sr_trigger_match *structure, shared_ptr channel) : - StructureWrapper(structure), channel(channel) + StructureWrapper(structure), channel(channel) { } @@ -1007,7 +1007,7 @@ PacketPayload::~PacketPayload() } Header::Header(const struct sr_datafeed_header *structure) : - StructureWrapper(structure), + StructureWrapper(structure), PacketPayload() { } @@ -1020,8 +1020,7 @@ shared_ptr Header::get_shared_pointer(Packet *parent) { return static_pointer_cast( static_pointer_cast
( - StructureWrapper:: - get_shared_pointer(parent))); + StructureWrapper::get_shared_pointer(parent))); } int Header::get_feed_version() @@ -1037,7 +1036,7 @@ Glib::TimeVal Header::get_start_time() } Meta::Meta(const struct sr_datafeed_meta *structure) : - StructureWrapper(structure), + StructureWrapper(structure), PacketPayload() { } @@ -1050,8 +1049,7 @@ shared_ptr Meta::get_shared_pointer(Packet *parent) { return static_pointer_cast( static_pointer_cast( - StructureWrapper:: - get_shared_pointer(parent))); + StructureWrapper::get_shared_pointer(parent))); } map Meta::get_config() @@ -1066,7 +1064,7 @@ map Meta::get_config() } Logic::Logic(const struct sr_datafeed_logic *structure) : - StructureWrapper(structure), + StructureWrapper(structure), PacketPayload() { } @@ -1079,8 +1077,7 @@ shared_ptr Logic::get_shared_pointer(Packet *parent) { return static_pointer_cast( static_pointer_cast( - StructureWrapper:: - get_shared_pointer(parent))); + StructureWrapper::get_shared_pointer(parent))); } void *Logic::get_data_pointer() @@ -1099,7 +1096,7 @@ unsigned int Logic::get_unit_size() } Analog::Analog(const struct sr_datafeed_analog *structure) : - StructureWrapper(structure), + StructureWrapper(structure), PacketPayload() { } @@ -1112,8 +1109,7 @@ shared_ptr Analog::get_shared_pointer(Packet *parent) { return static_pointer_cast( static_pointer_cast( - StructureWrapper:: - get_shared_pointer(parent))); + StructureWrapper::get_shared_pointer(parent))); } float *Analog::get_data_pointer() @@ -1151,7 +1147,7 @@ vector Analog::get_mq_flags() } InputFormat::InputFormat(const struct sr_input_module *structure) : - StructureWrapper(structure) + StructureWrapper(structure) { } @@ -1285,7 +1281,7 @@ vector Option::get_values() } OutputFormat::OutputFormat(const struct sr_output_module *structure) : - StructureWrapper(structure) + StructureWrapper(structure) { }