From 72b45bb8def087f2eff09ed671de788978853e2a Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 17 Oct 2019 16:01:22 -0700 Subject: 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 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). --- host/lib/usrp/gps_ctrl.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 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 f9e03b16a..07d7f4ec4 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -17,9 +17,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -47,7 +47,7 @@ gps_ctrl::~gps_ctrl(void){ class gps_ctrl_impl : public gps_ctrl{ private: - std::map > sentences; + std::map> 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); } } -- cgit v1.2.3