diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-09-28 13:13:41 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:32 -0800 |
commit | f773cf9fb96e25d064f43cffdc893ac905d91f15 (patch) | |
tree | b9aab514b0289687dcc006a831c832a53051f34d /host/lib/usrp/gps_ctrl.cpp | |
parent | fcc2e9c602a6103dfd0f75e035f614b177c5dc35 (diff) | |
download | uhd-f773cf9fb96e25d064f43cffdc893ac905d91f15.tar.gz uhd-f773cf9fb96e25d064f43cffdc893ac905d91f15.tar.bz2 uhd-f773cf9fb96e25d064f43cffdc893ac905d91f15.zip |
uhd: Replace boost::regex with std::regex
boost::regex was a requirement until the minimum version of gcc was
increased. Since it is at version 5.3 now, using Boost.Regex is no
longer necessary.
This change is a pure search-and-replace; Boost and std versions of
regex are compatible and use the same syntax.
Diffstat (limited to 'host/lib/usrp/gps_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/gps_ctrl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp index 717654151..f9e03b16a 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -14,7 +14,7 @@ #include <boost/thread/thread.hpp> #include <boost/tokenizer.hpp> #include <boost/format.hpp> -#include <boost/regex.hpp> +#include <regex> #include <boost/thread/mutex.hpp> #include <boost/date_time.hpp> #include <boost/tuple/tuple.hpp> @@ -137,8 +137,8 @@ private: } const std::list<std::string> keys{"GPGGA", "GPRMC", "SERVO"}; - static const boost::regex servo_regex("^\\d\\d-\\d\\d-\\d\\d.*$"); - static const boost::regex gp_msg_regex("^\\$GP.*,\\*[0-9A-F]{2}$"); + static const std::regex servo_regex("^\\d\\d-\\d\\d-\\d\\d.*$"); + static const std::regex gp_msg_regex("^\\$GP.*,\\*[0-9A-F]{2}$"); std::map<std::string,std::string> msgs; // Get all GPSDO messages available @@ -162,11 +162,11 @@ private: } // Look for SERVO message - if (boost::regex_search(msg, servo_regex, boost::regex_constants::match_continuous)) + if (std::regex_search(msg, servo_regex, std::regex_constants::match_continuous)) { msgs["SERVO"] = msg; } - else if (boost::regex_match(msg, gp_msg_regex) and is_nmea_checksum_ok(msg)) + else if (std::regex_match(msg, gp_msg_regex) and is_nmea_checksum_ok(msg)) { msgs[msg.substr(1,5)] = msg; } |