mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-26 12:04:55 +00:00
Apply and add clang-tidy ckecks readability-make-member-function-const and readability-qualified-auto
This commit is contained in:
@@ -366,7 +366,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(d_xml_base_path))
|
||||
for (const auto& folder : fs::path(d_xml_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
@@ -1506,7 +1506,7 @@ void rtklib_pvt_gs::clear_ephemeris()
|
||||
}
|
||||
|
||||
|
||||
bool rtklib_pvt_gs::send_sys_v_ttff_msg(d_ttff_msgbuf ttff)
|
||||
bool rtklib_pvt_gs::send_sys_v_ttff_msg(d_ttff_msgbuf ttff) const
|
||||
{
|
||||
if (d_sysv_msqid != -1)
|
||||
{
|
||||
@@ -2162,7 +2162,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
}
|
||||
std::streamsize ss = std::cout.precision(); // save current precision
|
||||
std::cout.setf(std::ios::fixed, std::ios::floatfield);
|
||||
auto facet = new boost::posix_time::time_facet("%Y-%b-%d %H:%M:%S.%f %z");
|
||||
auto *facet = new boost::posix_time::time_facet("%Y-%b-%d %H:%M:%S.%f %z");
|
||||
std::cout.imbue(std::locale(std::cout.getloc(), facet));
|
||||
std::cout
|
||||
<< TEXT_BOLD_GREEN
|
||||
|
||||
@@ -153,7 +153,7 @@ private:
|
||||
long mtype; // NOLINT(google-runtime-int) required by SysV queue messaging
|
||||
double ttff;
|
||||
} d_ttff_msgbuf;
|
||||
bool send_sys_v_ttff_msg(d_ttff_msgbuf ttff);
|
||||
bool send_sys_v_ttff_msg(d_ttff_msgbuf ttff) const;
|
||||
|
||||
bool save_gnss_synchro_map_xml(const std::string& file_name); // debug helper function
|
||||
bool load_gnss_synchro_map_xml(const std::string& file_name); // debug helper function
|
||||
|
||||
@@ -56,7 +56,7 @@ GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path)
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(geojson_base_path))
|
||||
for (const auto& folder : fs::path(geojson_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
|
||||
@@ -58,7 +58,7 @@ Gpx_Printer::Gpx_Printer(const std::string& base_path)
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(gpx_base_path))
|
||||
for (const auto& folder : fs::path(gpx_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
|
||||
@@ -60,7 +60,7 @@ Kml_Printer::Kml_Printer(const std::string& base_path)
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(kml_base_path))
|
||||
for (const auto& folder : fs::path(kml_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
|
||||
@@ -64,7 +64,7 @@ Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_fi
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(nmea_base_path))
|
||||
for (const auto& folder : fs::path(nmea_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
@@ -198,7 +198,7 @@ int Nmea_Printer::init_serial(const std::string& serial_device)
|
||||
}
|
||||
|
||||
|
||||
void Nmea_Printer::close_serial()
|
||||
void Nmea_Printer::close_serial() const
|
||||
{
|
||||
if (nmea_dev_descriptor != -1)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
|
||||
private:
|
||||
int init_serial(const std::string& serial_device); // serial port control
|
||||
void close_serial();
|
||||
void close_serial() const;
|
||||
std::string get_GPGGA() const; // fix data
|
||||
std::string get_GPGSV() const; // satellite data
|
||||
std::string get_GPGSA() const; // overall satellite reception data
|
||||
|
||||
@@ -87,7 +87,7 @@ Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path,
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(base_rinex_path))
|
||||
for (const auto& folder : fs::path(base_rinex_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
|
||||
@@ -1590,7 +1590,7 @@ std::string Rtcm::print_MT1019(const Gps_Ephemeris& gps_eph)
|
||||
}
|
||||
|
||||
|
||||
int32_t Rtcm::read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph)
|
||||
int32_t Rtcm::read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph) const
|
||||
{
|
||||
// Convert message to binary
|
||||
const std::string message_bin = Rtcm::binary_data_to_bin(message);
|
||||
@@ -1821,7 +1821,7 @@ std::string Rtcm::print_MT1020(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, c
|
||||
}
|
||||
|
||||
|
||||
int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& glonass_gnav_eph, Glonass_Gnav_Utc_Model& glonass_gnav_utc_model)
|
||||
int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& glonass_gnav_eph, Glonass_Gnav_Utc_Model& glonass_gnav_utc_model) const
|
||||
{
|
||||
// Convert message to binary
|
||||
const std::string message_bin = Rtcm::binary_data_to_bin(message);
|
||||
@@ -2127,7 +2127,7 @@ std::string Rtcm::print_MT1045(const Galileo_Ephemeris& gal_eph)
|
||||
}
|
||||
|
||||
|
||||
int32_t Rtcm::read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph)
|
||||
int32_t Rtcm::read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph) const
|
||||
{
|
||||
// Convert message to binary
|
||||
const std::string message_bin = Rtcm::binary_data_to_bin(message);
|
||||
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
/*!
|
||||
* \brief Verifies and reads messages of type 1019 (GPS Ephemeris). Returns 1 if anything goes wrong, 0 otherwise.
|
||||
*/
|
||||
int32_t read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph);
|
||||
int32_t read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph) const;
|
||||
|
||||
/*!
|
||||
* \brief Prints message type 1020 (GLONASS Ephemeris).
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
* \param glonass_gnav_utc_model GLONASS GNAV Clock Information
|
||||
* \return Returns 1 if anything goes wrong, 0 otherwise.
|
||||
*/
|
||||
int32_t read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& glonass_gnav_eph, Glonass_Gnav_Utc_Model& glonass_gnav_utc_model);
|
||||
int32_t read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& glonass_gnav_eph, Glonass_Gnav_Utc_Model& glonass_gnav_utc_model) const;
|
||||
|
||||
/*!
|
||||
* \brief Prints message type 1029 (Unicode Text String)
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
/*!
|
||||
* \brief Verifies and reads messages of type 1045 (Galileo Ephemeris). Returns 1 if anything goes wrong, 0 otherwise.
|
||||
*/
|
||||
int32_t read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph);
|
||||
int32_t read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph) const;
|
||||
|
||||
/*!
|
||||
* \brief Prints messages of type MSM1 (Compact GNSS observables)
|
||||
|
||||
@@ -71,7 +71,7 @@ Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(rtcm_base_path))
|
||||
for (const auto& folder : fs::path(rtcm_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
@@ -1651,7 +1651,7 @@ int Rtcm_Printer::init_serial(const std::string& serial_device)
|
||||
}
|
||||
|
||||
|
||||
void Rtcm_Printer::close_serial()
|
||||
void Rtcm_Printer::close_serial() const
|
||||
{
|
||||
if (rtcm_dev_descriptor != -1)
|
||||
{
|
||||
|
||||
@@ -179,7 +179,7 @@ private:
|
||||
bool more_messages);
|
||||
|
||||
int32_t init_serial(const std::string& serial_device); // serial port control
|
||||
void close_serial();
|
||||
void close_serial() const;
|
||||
bool Print_Message(const std::string& message);
|
||||
|
||||
std::unique_ptr<Rtcm> rtcm;
|
||||
|
||||
Reference in New Issue
Block a user