summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/c++
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2020-03-14 12:01:44 +0000
committerMichael Dickens <michael.dickens@ettus.com>2020-04-01 11:44:45 -0400
commit7a9169fe8cca1cb378be0d0d403e03a338ffbfda (patch)
treefef77ae9c34538b78e4172580cb5ecdc24d40134 /gr-uhd/examples/c++
parent82262753a56d15cfa6343044c726cf0035c38d9c (diff)
Switch from boost pointers to std C++11 pointers
Most of this code is automated code changes: ``` set -e SUB="s/dummy/dummy/" for i in shared_ptr make_shared dynamic_pointer_cast weak_ptr enable_shared_from_this get_deleter; do SUB="$SUB;s/boost::$i/std::$i/g" done SUB="$SUB;s^#include <boost/shared_ptr.hpp>^#include <memory>^g" SUB="$SUB;s^namespace boost^namespace std^g" find . \( -name "*.cc" -o -name "*.h" -o -name "*.i" -o -name "*.cxx" -o -name "*.py" \) -print0 | xargs -0 sed -i "$SUB" ``` Only one manual change. In `./gr-fec/lib/fec_mtrx_impl.cc`, add `#include <algorithm>`.
Diffstat (limited to 'gr-uhd/examples/c++')
-rw-r--r--gr-uhd/examples/c++/tags_demo.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/gr-uhd/examples/c++/tags_demo.cc b/gr-uhd/examples/c++/tags_demo.cc
index d8dd6513af..f900682653 100644
--- a/gr-uhd/examples/c++/tags_demo.cc
+++ b/gr-uhd/examples/c++/tags_demo.cc
@@ -86,7 +86,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
usrp_source->set_samp_rate(samp_rate);
usrp_source->set_center_freq(center_freq);
- boost::shared_ptr<tag_sink_demo> tag_sink = boost::make_shared<tag_sink_demo>();
+ std::shared_ptr<tag_sink_demo> tag_sink = std::make_shared<tag_sink_demo>();
//------------------------------------------------------------------
//-- connect the usrp source test blocks
@@ -103,13 +103,13 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
const uhd::time_spec_t time_now = usrp_sink->get_time_now();
const double actual_samp_rate = usrp_sink->get_samp_rate();
- boost::shared_ptr<tag_source_demo> tag_source = boost::make_shared<tag_source_demo>(
- time_now.get_full_secs() + 1,
- time_now.get_frac_secs(), // time now + 1 second
- actual_samp_rate,
- idle_dur,
- burst_dur,
- length_tag);
+ std::shared_ptr<tag_source_demo> tag_source =
+ std::make_shared<tag_source_demo>(time_now.get_full_secs() + 1,
+ time_now.get_frac_secs(), // time now + 1 second
+ actual_samp_rate,
+ idle_dur,
+ burst_dur,
+ length_tag);
//------------------------------------------------------------------
//-- connect the usrp sink test blocks