aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-09-28 11:18:57 +0200
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:32 -0800
commit1fe98e8701dd0b790b172762c3629db32956d1fc (patch)
tree7719e69633f9639f1dcdcf00ebf7db6c4cd6dda2 /host/lib/usrp/x300
parent8541a9b397fb53034c37dd00289aa96def24d410 (diff)
downloaduhd-1fe98e8701dd0b790b172762c3629db32956d1fc.tar.gz
uhd-1fe98e8701dd0b790b172762c3629db32956d1fc.tar.bz2
uhd-1fe98e8701dd0b790b172762c3629db32956d1fc.zip
uhd: Replace usage of boost smart pointers with C++11 counterparts
This removes the following Boost constructs: - boost::shared_ptr, boost::weak_ptr - boost::enable_shared_from_this - boost::static_pointer_cast, boost::dynamic_pointer_cast The appropriate includes were also removed. All C++11 versions of these require #include <memory>. Note that the stdlib and Boost versions have the exact same syntax, they only differ in the namespace (boost vs. std). The modifications were all done using sed, with the exception of boost::scoped_ptr, which was replaced by std::unique_ptr. References to boost::smart_ptr were also removed. boost::intrusive_ptr is not removed in this commit, since it does not have a 1:1 mapping to a C++11 construct.
Diffstat (limited to 'host/lib/usrp/x300')
-rw-r--r--host/lib/usrp/x300/x300_adc_ctrl.hpp4
-rw-r--r--host/lib/usrp/x300/x300_clock_ctrl.hpp4
-rw-r--r--host/lib/usrp/x300/x300_dac_ctrl.hpp4
-rw-r--r--host/lib/usrp/x300/x300_mb_eeprom_iface.cpp4
-rw-r--r--host/lib/usrp/x300/x300_mb_eeprom_iface.hpp4
-rw-r--r--host/lib/usrp/x300/x300_pcie_mgr.cpp4
-rw-r--r--host/lib/usrp/x300/x300_radio_control.cpp6
7 files changed, 15 insertions, 15 deletions
diff --git a/host/lib/usrp/x300/x300_adc_ctrl.hpp b/host/lib/usrp/x300/x300_adc_ctrl.hpp
index 354b8db49..c69c4c427 100644
--- a/host/lib/usrp/x300/x300_adc_ctrl.hpp
+++ b/host/lib/usrp/x300/x300_adc_ctrl.hpp
@@ -10,12 +10,12 @@
#include <uhd/types/serial.hpp>
#include <uhd/utils/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
class x300_adc_ctrl : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<x300_adc_ctrl> sptr;
+ typedef std::shared_ptr<x300_adc_ctrl> sptr;
virtual ~x300_adc_ctrl(void) = 0;
diff --git a/host/lib/usrp/x300/x300_clock_ctrl.hpp b/host/lib/usrp/x300/x300_clock_ctrl.hpp
index 25c2dd33f..af8c3c162 100644
--- a/host/lib/usrp/x300/x300_clock_ctrl.hpp
+++ b/host/lib/usrp/x300/x300_clock_ctrl.hpp
@@ -10,7 +10,7 @@
#include <uhd/types/serial.hpp>
#include <uhd/utils/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
enum x300_clock_which_t {
@@ -28,7 +28,7 @@ enum x300_clock_which_t {
class x300_clock_ctrl : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<x300_clock_ctrl> sptr;
+ typedef std::shared_ptr<x300_clock_ctrl> sptr;
virtual ~x300_clock_ctrl(void) = 0;
diff --git a/host/lib/usrp/x300/x300_dac_ctrl.hpp b/host/lib/usrp/x300/x300_dac_ctrl.hpp
index d73a03d63..9844ffce6 100644
--- a/host/lib/usrp/x300/x300_dac_ctrl.hpp
+++ b/host/lib/usrp/x300/x300_dac_ctrl.hpp
@@ -10,12 +10,12 @@
#include <uhd/types/serial.hpp>
#include <uhd/utils/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
class x300_dac_ctrl : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<x300_dac_ctrl> sptr;
+ typedef std::shared_ptr<x300_dac_ctrl> sptr;
virtual ~x300_dac_ctrl(void) = 0;
diff --git a/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp b/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp
index b4dab8291..42d0b32ca 100644
--- a/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp
+++ b/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp
@@ -27,7 +27,7 @@
#include <uhd/utils/log.hpp>
#include <uhd/utils/platform.hpp>
#include <boost/thread.hpp>
-#include <boost/make_shared.hpp>
+#include <memory>
using namespace uhd;
@@ -158,5 +158,5 @@ x300_mb_eeprom_iface::~x300_mb_eeprom_iface(void)
x300_mb_eeprom_iface::sptr x300_mb_eeprom_iface::make(
wb_iface::sptr wb, i2c_iface::sptr i2c)
{
- return boost::make_shared<x300_mb_eeprom_iface_impl>(wb, i2c->eeprom16());
+ return std::make_shared<x300_mb_eeprom_iface_impl>(wb, i2c->eeprom16());
}
diff --git a/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp b/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp
index d323d6359..2d08d5711 100644
--- a/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp
+++ b/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp
@@ -11,13 +11,13 @@
#include <uhd/config.hpp>
#include <uhd/types/serial.hpp>
#include <uhd/types/wb_iface.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/utility.hpp>
class x300_mb_eeprom_iface : public uhd::i2c_iface
{
public:
- typedef boost::shared_ptr<x300_mb_eeprom_iface> sptr;
+ typedef std::shared_ptr<x300_mb_eeprom_iface> sptr;
virtual ~x300_mb_eeprom_iface(void) = 0;
diff --git a/host/lib/usrp/x300/x300_pcie_mgr.cpp b/host/lib/usrp/x300/x300_pcie_mgr.cpp
index 6560f2770..8466a5174 100644
--- a/host/lib/usrp/x300/x300_pcie_mgr.cpp
+++ b/host/lib/usrp/x300/x300_pcie_mgr.cpp
@@ -58,7 +58,7 @@ using namespace uhd::niusrprio;
// We need a zpu xport registry to ensure synchronization between the static
// finder method and the instances of the x300_impl class.
-typedef std::unordered_map<std::string, boost::weak_ptr<uhd::wb_iface>>
+typedef std::unordered_map<std::string, std::weak_ptr<uhd::wb_iface>>
pcie_zpu_iface_registry_t;
UHD_SINGLETON_FCN(pcie_zpu_iface_registry_t, get_pcie_zpu_iface_registry)
static std::mutex pcie_zpu_iface_registry_mutex;
@@ -249,7 +249,7 @@ wb_iface::sptr pcie_manager::get_ctrl_iface()
"Someone else has a ZPU transport to the device open. Internal error!");
}
auto zpu_ctrl = x300_make_ctrl_iface_pcie(_rio_fpga_interface->get_kernel_proxy());
- get_pcie_zpu_iface_registry()[_resource] = boost::weak_ptr<wb_iface>(zpu_ctrl);
+ get_pcie_zpu_iface_registry()[_resource] = std::weak_ptr<wb_iface>(zpu_ctrl);
return zpu_ctrl;
}
diff --git a/host/lib/usrp/x300/x300_radio_control.cpp b/host/lib/usrp/x300/x300_radio_control.cpp
index 6cee57827..8e4351d65 100644
--- a/host/lib/usrp/x300/x300_radio_control.cpp
+++ b/host/lib/usrp/x300/x300_radio_control.cpp
@@ -28,7 +28,7 @@
#include <uhdlib/usrp/cores/spi_core_3000.hpp>
#include <uhdlib/usrp/cores/tx_frontend_core_200.hpp>
#include <boost/algorithm/string.hpp>
-#include <boost/make_shared.hpp>
+#include <memory>
#include <algorithm>
#include <chrono>
#include <functional>
@@ -1492,7 +1492,7 @@ private:
// create a new dboard manager
RFNOC_LOG_TRACE("Creating DB interface...");
- _db_iface = boost::make_shared<x300_dboard_iface>(db_config);
+ _db_iface = std::make_shared<x300_dboard_iface>(db_config);
RFNOC_LOG_TRACE("Creating DB manager...");
_db_manager = dboard_manager::make(_db_eeproms[RX_EEPROM_ADDR + DB_OFFSET],
_db_eeproms[TX_EEPROM_ADDR + DB_OFFSET],
@@ -1889,7 +1889,7 @@ private:
//! Reference to DB manager
usrp::dboard_manager::sptr _db_manager;
//! Reference to DB iface
- boost::shared_ptr<x300_dboard_iface> _db_iface;
+ std::shared_ptr<x300_dboard_iface> _db_iface;
enum radio_connection_t { PRIMARY, SECONDARY };
radio_connection_t _radio_type;