diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-04-26 13:13:32 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-05-02 17:01:21 -0700 |
commit | 5d9a7c92d3eb0a9cb719e6e6386d533da59a51db (patch) | |
tree | 024bda2ede2231784b55c48e1a23ab39fd97182d /host/lib/usrp/gps_ctrl.cpp | |
parent | c52c0b69fc151c7596f9754e6b1e40dede531134 (diff) | |
download | uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.tar.gz uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.tar.bz2 uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.zip |
lib: Purge use of boost::assign, except for uhd::dict
Replaced with initialization lists.
Note: uhd::dict does not work with initializer lists without making
changes to said data structure. This commit has no functional changes,
so keeping the boost::assigns for uhd::dict.
Diffstat (limited to 'host/lib/usrp/gps_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/gps_ctrl.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp index f030108cc..67803bec6 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -11,8 +11,6 @@ #include <uhd/exception.hpp> #include <uhd/types/sensors.hpp> #include <boost/algorithm/string.hpp> -#include <boost/assign/list_of.hpp> -#include <stdint.h> #include <boost/thread/thread.hpp> #include <boost/tokenizer.hpp> #include <boost/format.hpp> @@ -24,6 +22,7 @@ #include <string> #include <thread> #include <chrono> +#include <stdint.h> using namespace uhd; using namespace boost::posix_time; @@ -137,7 +136,7 @@ private: return; } - const std::list<std::string> keys = boost::assign::list_of("GPGGA")("GPRMC")("SERVO"); + 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}$"); std::map<std::string,std::string> msgs; @@ -266,13 +265,14 @@ public: //return a list of supported sensors std::vector<std::string> get_sensors(void) { - std::vector<std::string> ret = boost::assign::list_of - ("gps_gpgga") - ("gps_gprmc") - ("gps_time") - ("gps_locked") - ("gps_servo"); - return ret; + std::vector<std::string> ret{ + "gps_gpgga", + "gps_gprmc", + "gps_time", + "gps_locked", + "gps_servo" + }; + return ret; } uhd::sensor_value_t get_sensor(std::string key) { |