diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-10-17 16:01:22 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:32 -0800 |
commit | 72b45bb8def087f2eff09ed671de788978853e2a (patch) | |
tree | 87fc86059b61e5dc43ba19332056075bef845f6d /host/lib/usrp/gps_ctrl.cpp | |
parent | d3a16b702230534f7265613a73204bdb051a458e (diff) | |
download | uhd-72b45bb8def087f2eff09ed671de788978853e2a.tar.gz uhd-72b45bb8def087f2eff09ed671de788978853e2a.tar.bz2 uhd-72b45bb8def087f2eff09ed671de788978853e2a.zip |
uhd: Remove all usages of boost::tuple and friends
This replaces all of the following with standard C++ features:
- boost::tuple
- boost::make_tuple
- boost::tuple::get
- #include <boost/tuple/tuple.hpp>
All usages were replaced with search-and-replace scripts (the usages of
get could be automatically replaced with a vim macro, the rest was
straightforward search-and-replace).
Diffstat (limited to 'host/lib/usrp/gps_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/gps_ctrl.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp index f9e03b16a..07d7f4ec4 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -17,9 +17,9 @@ #include <regex> #include <boost/thread/mutex.hpp> #include <boost/date_time.hpp> -#include <boost/tuple/tuple.hpp> #include <ctime> #include <string> +#include <tuple> #include <thread> #include <chrono> #include <stdint.h> @@ -47,7 +47,7 @@ gps_ctrl::~gps_ctrl(void){ class gps_ctrl_impl : public gps_ctrl{ private: - std::map<std::string, boost::tuple<std::string, boost::system_time, bool> > sentences; + std::map<std::string, std::tuple<std::string, boost::system_time, bool>> sentences; boost::mutex cache_mutex; boost::system_time _last_cache_update; @@ -64,7 +64,7 @@ private: update_cache(); //mark sentence as touched if (sentences.find(which) != sentences.end()) - sentences[which].get<2>() = true; + std::get<2>(sentences[which]) = true; } while (1) { @@ -82,12 +82,12 @@ private: { age = milliseconds(max_age_ms); } else { - age = boost::get_system_time() - sentences[which].get<1>(); + age = boost::get_system_time() - std::get<1>(sentences[which]); } - if (age < milliseconds(max_age_ms) and (not (wait_for_next and sentences[which].get<2>()))) + if (age < milliseconds(max_age_ms) and (not (wait_for_next and std::get<2>(sentences[which])))) { - sentence = sentences[which].get<0>(); - sentences[which].get<2>() = true; + sentence = std::get<0>(sentences[which]); + std::get<2>(sentences[which]) = true; } } catch(std::exception &e) { UHD_LOGGER_DEBUG("GPS") << "get_sentence: " << e.what(); @@ -183,7 +183,7 @@ private: { if (not msgs[key].empty()) { - sentences[key] = boost::make_tuple(msgs[key], time, false); + sentences[key] = std::make_tuple(msgs[key], time, false); } } |