aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/expert_test.cpp
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/tests/expert_test.cpp
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/tests/expert_test.cpp')
-rw-r--r--host/tests/expert_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/tests/expert_test.cpp b/host/tests/expert_test.cpp
index 36a9ef03b..99e3c1100 100644
--- a/host/tests/expert_test.cpp
+++ b/host/tests/expert_test.cpp
@@ -9,7 +9,7 @@
#include <uhdlib/experts/expert_container.hpp>
#include <uhdlib/experts/expert_factory.hpp>
#include <boost/format.hpp>
-#include <boost/make_shared.hpp>
+#include <memory>
#include <boost/test/unit_test.hpp>
#include <fstream>
@@ -112,7 +112,7 @@ private:
class worker5_t : public worker_node_t
{
public:
- worker5_t(const node_retriever_t& db, boost::shared_ptr<int> output)
+ worker5_t(const node_retriever_t& db, std::shared_ptr<int> output)
: worker_node_t("Consume_G"), _g(db, "G"), _c(db, "C"), _output(output)
{
bind_accessor(_g);
@@ -128,7 +128,7 @@ private:
data_reader_t<int> _g;
data_writer_t<int> _c;
- boost::shared_ptr<int> _output;
+ std::shared_ptr<int> _output;
};
class worker6_t : public worker_node_t
@@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(test_experts)
uhd::property_tree::sptr tree = uhd::property_tree::make();
// Output of expert tree
- boost::shared_ptr<int> final_output = boost::make_shared<int>();
+ std::shared_ptr<int> final_output = std::make_shared<int>();
// Add data nodes to container
expert_factory::add_dual_prop_node<int>(