diff options
author | Thomas Habets <thomas@habets.se> | 2020-03-14 12:01:44 +0000 |
---|---|---|
committer | Michael Dickens <michael.dickens@ettus.com> | 2020-04-01 11:44:45 -0400 |
commit | 7a9169fe8cca1cb378be0d0d403e03a338ffbfda (patch) | |
tree | fef77ae9c34538b78e4172580cb5ecdc24d40134 /gnuradio-runtime/lib/hier_block2_detail.cc | |
parent | 82262753a56d15cfa6343044c726cf0035c38d9c (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 'gnuradio-runtime/lib/hier_block2_detail.cc')
-rw-r--r-- | gnuradio-runtime/lib/hier_block2_detail.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gnuradio-runtime/lib/hier_block2_detail.cc b/gnuradio-runtime/lib/hier_block2_detail.cc index 02b324cfeb..512cfaa33e 100644 --- a/gnuradio-runtime/lib/hier_block2_detail.cc +++ b/gnuradio-runtime/lib/hier_block2_detail.cc @@ -581,7 +581,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const if (set_all_min_buff) { // sets the min buff for every block within hier_block2 if (min_buff != 0) { - block_sptr bb = boost::dynamic_pointer_cast<block>(b); + block_sptr bb = std::dynamic_pointer_cast<block>(b); if (bb != 0) { if (bb->min_output_buffer(0) != min_buff) { if (HIER_BLOCK2_DETAIL_DEBUG) @@ -590,7 +590,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const bb->set_min_output_buffer(min_buff); } } else { - hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(b); + hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(b); if (hh != 0) { if (hh->min_output_buffer(0) != min_buff) { if (HIER_BLOCK2_DETAIL_DEBUG) @@ -606,7 +606,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const if (set_all_max_buff) { // sets the max buff for every block within hier_block2 if (max_buff != 0) { - block_sptr bb = boost::dynamic_pointer_cast<block>(b); + block_sptr bb = std::dynamic_pointer_cast<block>(b); if (bb != 0) { if (bb->max_output_buffer(0) != max_buff) { if (HIER_BLOCK2_DETAIL_DEBUG) @@ -615,7 +615,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const bb->set_max_output_buffer(max_buff); } } else { - hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(b); + hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(b); if (hh != 0) { if (hh->max_output_buffer(0) != max_buff) { if (HIER_BLOCK2_DETAIL_DEBUG) @@ -633,7 +633,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const if (set_all_min_buff) { // sets the min buff for every block within hier_block2 if (min_buff != 0) { - block_sptr bb = boost::dynamic_pointer_cast<block>(b); + block_sptr bb = std::dynamic_pointer_cast<block>(b); if (bb != 0) { if (bb->min_output_buffer(0) != min_buff) { if (HIER_BLOCK2_DETAIL_DEBUG) @@ -642,7 +642,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const bb->set_min_output_buffer(min_buff); } } else { - hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(b); + hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(b); if (hh != 0) { if (hh->min_output_buffer(0) != min_buff) { if (HIER_BLOCK2_DETAIL_DEBUG) @@ -658,7 +658,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const if (set_all_max_buff) { // sets the max buff for every block within hier_block2 if (max_buff != 0) { - block_sptr bb = boost::dynamic_pointer_cast<block>(b); + block_sptr bb = std::dynamic_pointer_cast<block>(b); if (bb != 0) { if (bb->max_output_buffer(0) != max_buff) { if (HIER_BLOCK2_DETAIL_DEBUG) @@ -667,7 +667,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const bb->set_max_output_buffer(max_buff); } } else { - hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(b); + hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(b); if (hh != 0) { if (hh->max_output_buffer(0) != max_buff) { if (HIER_BLOCK2_DETAIL_DEBUG) @@ -793,7 +793,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const if (!set_all_min_buff) { min_buff = d_owner->min_output_buffer(i); if (min_buff != 0) { - block_sptr bb = boost::dynamic_pointer_cast<block>(blk); + block_sptr bb = std::dynamic_pointer_cast<block>(blk); if (bb != 0) { int bb_src_port = d_outputs[i].port(); if (HIER_BLOCK2_DETAIL_DEBUG) @@ -802,7 +802,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const << std::endl; bb->set_min_output_buffer(bb_src_port, min_buff); } else { - hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(blk); + hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(blk); if (hh != 0) { int hh_src_port = d_outputs[i].port(); if (HIER_BLOCK2_DETAIL_DEBUG) @@ -817,7 +817,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const if (!set_all_max_buff) { max_buff = d_owner->max_output_buffer(i); if (max_buff != 0) { - block_sptr bb = boost::dynamic_pointer_cast<block>(blk); + block_sptr bb = std::dynamic_pointer_cast<block>(blk); if (bb != 0) { int bb_src_port = d_outputs[i].port(); if (HIER_BLOCK2_DETAIL_DEBUG) @@ -826,7 +826,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const << std::endl; bb->set_max_output_buffer(bb_src_port, max_buff); } else { - hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(blk); + hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(blk); if (hh != 0) { int hh_src_port = d_outputs[i].port(); if (HIER_BLOCK2_DETAIL_DEBUG) |