aboutsummaryrefslogtreecommitdiffstats
path: root/gr-utils
diff options
context:
space:
mode:
authorJosh Morman <jmorman@peratonlabs.com>2021-10-18 13:16:10 -0400
committerMarcus Müller <marcus@hostalia.de>2021-10-21 13:55:09 +0200
commitdee640362cb565757f0f09dc2001127e0ffaa33e (patch)
treefc0b971a04edc1cc5a7d6119d14d22f77f243b8f /gr-utils
parentGRC: be tolerant against Gtk.init_check failure, which seems to be flimsy (diff)
downloadgnuradio-dee640362cb565757f0f09dc2001127e0ffaa33e.tar.xz
gnuradio-dee640362cb565757f0f09dc2001127e0ffaa33e.zip
modtool: replace reinterpret_cast with static_cast
static_cast is preferable to reinterpret_cast, and can easily be used when casting from void * Signed-off-by: Josh Morman <jmorman@peratonlabs.com>
Diffstat (limited to 'gr-utils')
-rw-r--r--gr-utils/modtool/templates/templates.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/gr-utils/modtool/templates/templates.py b/gr-utils/modtool/templates/templates.py
index 656cfccb8..851a5d6d7 100644
--- a/gr-utils/modtool/templates/templates.py
+++ b/gr-utils/modtool/templates/templates.py
@@ -186,10 +186,10 @@ namespace gr {
gr_vector_void_star &output_items)
{
% if blocktype != 'source':
- const input_type *in = reinterpret_cast<const input_type*>(input_items[0]);
+ auto in = static_cast<const input_type*>(input_items[0]);
% endif
% if blocktype != 'sink':
- output_type *out = reinterpret_cast<output_type*>(output_items[0]);
+ auto out = static_cast<output_type*>(output_items[0]);
% endif
#pragma message("Implement the signal processing in your block and remove this warning")
@@ -217,10 +217,10 @@ namespace gr {
gr_vector_void_star &output_items)
{
% if blocktype != 'source':
- const input_type *in = reinterpret_cast<const input_type*>(input_items[0]);
+ auto in = static_cast<const input_type*>(input_items[0]);
% endif
% if blocktype != 'sink':
- output_type *out = reinterpret_cast<output_type*>(output_items[0]);
+ auto out = static_cast<output_type*>(output_items[0]);
% endif
#pragma message("Implement the signal processing in your block and remove this warning")
@@ -237,10 +237,10 @@ namespace gr {
gr_vector_void_star &output_items)
{
% if blocktype != 'source':
- const input_type *in = reinterpret_cast<const input_type*>(input_items[0]);
+ auto in = static_cast<const input_type*>(input_items[0]);
% endif
% if blocktype != 'sink':
- output_type *out = reinterpret_cast<output_type*>(output_items[0]);
+ auto out = static_cast<output_type*>(output_items[0]);
% endif
#pragma message("Implement the signal processing in your block and remove this warning")