diff --git a/src/core/libs/INIReader.cc b/src/core/libs/INIReader.cc index 440a1fd75..c7eb2a073 100644 --- a/src/core/libs/INIReader.cc +++ b/src/core/libs/INIReader.cc @@ -33,8 +33,8 @@ INIReader::INIReader(const std::string& filename) + : _error(ini_parse(filename.c_str(), ValueHandler, this)) { - _error = ini_parse(filename.c_str(), ValueHandler, this); } diff --git a/src/core/libs/channel_event.cc b/src/core/libs/channel_event.cc index 818d25a7d..b23b004da 100644 --- a/src/core/libs/channel_event.cc +++ b/src/core/libs/channel_event.cc @@ -22,7 +22,7 @@ channel_event_sptr channel_event_make(int channel_id, int event_type) } Channel_Event::Channel_Event(int channel_id_, int event_type_) + : channel_id(channel_id_), + event_type(event_type_) { - channel_id = channel_id_; - event_type = event_type_; } diff --git a/src/core/libs/command_event.cc b/src/core/libs/command_event.cc index 9a4cc539f..1f5bdfcfd 100644 --- a/src/core/libs/command_event.cc +++ b/src/core/libs/command_event.cc @@ -22,7 +22,7 @@ command_event_sptr command_event_make(int command_id, int event_type) } Command_Event::Command_Event(int command_id_, int event_type_) + : command_id(command_id_), + event_type(event_type_) { - command_id = command_id_; - event_type = event_type_; } diff --git a/src/core/libs/gnss_sdr_fpga_sample_counter.cc b/src/core/libs/gnss_sdr_fpga_sample_counter.cc index 57bd274ed..a36540e92 100644 --- a/src/core/libs/gnss_sdr_fpga_sample_counter.cc +++ b/src/core/libs/gnss_sdr_fpga_sample_counter.cc @@ -46,30 +46,31 @@ gnss_sdr_fpga_sample_counter::gnss_sdr_fpga_sample_counter( double _fs, - int32_t _interval_ms) : gr::block("fpga_fpga_sample_counter", - gr::io_signature::make(0, 0, 0), - gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) + int32_t _interval_ms) + : gr::block("fpga_fpga_sample_counter", + gr::io_signature::make(0, 0, 0), + gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))), + fs(_fs), + sample_counter(0ULL), + last_sample_counter(0ULL), + current_T_rx_ms(0), + interval_ms(_interval_ms), + current_s(0), + current_m(0), + current_h(0), + current_days(0), + report_interval_ms(1000), // default reporting 1 second + flag_enable_send_msg(false), // enable it for reporting time with asynchronous message + flag_m(false), + flag_h(false), + flag_days(false), + is_open(true) { message_port_register_out(pmt::mp("fpga_sample_counter")); set_max_noutput_items(1); - interval_ms = _interval_ms; - fs = _fs; samples_per_output = std::round(fs * static_cast(interval_ms) / 1e3); - open_device(); - is_open = true; - sample_counter = 0ULL; - last_sample_counter = 0ULL; - current_T_rx_ms = 0; - current_s = 0; - current_m = 0; - current_h = 0; - current_days = 0; - report_interval_ms = 1000; // default reporting 1 second samples_per_report = std::round(fs * static_cast(report_interval_ms) / 1e3); - flag_enable_send_msg = false; // enable it for reporting time with asynchronous message - flag_m = false; - flag_h = false; - flag_days = false; + open_device(); } diff --git a/src/core/libs/gnss_sdr_sample_counter.cc b/src/core/libs/gnss_sdr_sample_counter.cc index 05ff03745..8a607ba50 100644 --- a/src/core/libs/gnss_sdr_sample_counter.cc +++ b/src/core/libs/gnss_sdr_sample_counter.cc @@ -31,27 +31,28 @@ gnss_sdr_sample_counter::gnss_sdr_sample_counter( double _fs, int32_t _interval_ms, - size_t _size) : gr::sync_decimator("sample_counter", - gr::io_signature::make(1, 1, _size), - gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), - static_cast(std::round(_fs * static_cast(_interval_ms) / 1e3))) + size_t _size) + : gr::sync_decimator("sample_counter", + gr::io_signature::make(1, 1, _size), + gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), + static_cast(std::round(_fs * static_cast(_interval_ms) / 1e3))), + fs(_fs), + current_T_rx_ms(0), + sample_counter(0), + interval_ms(_interval_ms), + report_interval_ms(1000), // default reporting 1 second + samples_per_output(std::round(fs * static_cast(interval_ms) / 1e3)), + current_s(0), + current_m(0), + current_h(0), + current_days(0), + flag_m(false), + flag_h(false), + flag_days(false), + flag_enable_send_msg(false) // enable it for reporting time with asynchronous message { message_port_register_out(pmt::mp("sample_counter")); set_max_noutput_items(1); - interval_ms = _interval_ms; - fs = _fs; - samples_per_output = std::round(fs * static_cast(interval_ms) / 1e3); - sample_counter = 0; - current_T_rx_ms = 0; - current_s = 0; - current_m = 0; - current_h = 0; - current_days = 0; - report_interval_ms = 1000; // default reporting 1 second - flag_enable_send_msg = false; // enable it for reporting time with asynchronous message - flag_m = false; - flag_h = false; - flag_days = false; set_tag_propagation_policy(TPP_DONT); // no tag propagation, the time tag will be adjusted and regenerated in work() } diff --git a/src/core/libs/gnss_sdr_supl_client.cc b/src/core/libs/gnss_sdr_supl_client.cc index d09b3c099..10dda2be4 100644 --- a/src/core/libs/gnss_sdr_supl_client.cc +++ b/src/core/libs/gnss_sdr_supl_client.cc @@ -31,15 +31,10 @@ #include Gnss_Sdr_Supl_Client::Gnss_Sdr_Supl_Client() + : server_port(0), request(0), mcc(0), mns(0), lac(0), ci(0) { - mcc = 0; - mns = 0; - lac = 0; - ci = 0; supl_ctx_new(&ctx); assist = supl_assist_t(); - server_port = 0; - request = 0; } diff --git a/src/core/libs/gnss_sdr_time_counter.cc b/src/core/libs/gnss_sdr_time_counter.cc index 434f9aad9..06d87f2fa 100644 --- a/src/core/libs/gnss_sdr_time_counter.cc +++ b/src/core/libs/gnss_sdr_time_counter.cc @@ -21,20 +21,21 @@ #include #include -gnss_sdr_time_counter::gnss_sdr_time_counter() : gr::block("time_counter", - gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), - gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) +gnss_sdr_time_counter::gnss_sdr_time_counter() + : gr::block("time_counter", + gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), + gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))), + current_T_rx_ms(0), + report_interval_ms(1000), // default reporting 1 second + current_s(0), + current_m(0), + current_h(0), + current_days(0), + flag_m(false), + flag_h(false), + flag_days(false) { set_max_noutput_items(1); - current_T_rx_ms = 0; - current_s = 0; - current_m = 0; - current_h = 0; - current_days = 0; - report_interval_ms = 1000; // default reporting 1 second - flag_m = false; - flag_h = false; - flag_days = false; }