From 107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 8 Jan 2021 09:33:36 +0100 Subject: host: Update code base using clang-tidy The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json --- host/lib/usrp/gps_ctrl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'host/lib/usrp/gps_ctrl.cpp') diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp index 60866b85e..bcf938863 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -248,20 +248,20 @@ public: update_cache(); } - ~gps_ctrl_impl(void) + ~gps_ctrl_impl(void) override { /* NOP */ } // return a list of supported sensors - std::vector get_sensors(void) + std::vector get_sensors(void) override { std::vector ret{ "gps_gpgga", "gps_gprmc", "gps_time", "gps_locked", "gps_servo"}; return ret; } - uhd::sensor_value_t get_sensor(std::string key) + uhd::sensor_value_t get_sensor(std::string key) override { if (key == "gps_gpgga" or key == "gps_gprmc") { return sensor_value_t(boost::to_upper_copy(key), @@ -333,7 +333,7 @@ private: std::string datestr = get_token(reply, 9); std::string timestr = get_token(reply, 1); - if (datestr.size() == 0 or timestr.size() == 0) { + if (datestr.empty() or timestr.empty()) { throw uhd::value_error( str(boost::format("Invalid response \"%s\"") % reply)); } @@ -368,7 +368,7 @@ private: return (get_time() - from_time_t(0)).total_seconds(); } - bool gps_detected(void) + bool gps_detected(void) override { return (_gps_type != GPS_TYPE_NONE); } -- cgit v1.2.3