diff options
author | Josh Morman <jmorman@peratonlabs.com> | 2021-10-18 13:16:10 -0400 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2021-10-21 13:55:09 +0200 |
commit | dee640362cb565757f0f09dc2001127e0ffaa33e (patch) | |
tree | fc0b971a04edc1cc5a7d6119d14d22f77f243b8f | |
parent | fe3b52cf1d80cf4c393ce3820172b7df4f31b84b (diff) |
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>
-rw-r--r-- | gr-utils/modtool/templates/templates.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gr-utils/modtool/templates/templates.py b/gr-utils/modtool/templates/templates.py index 656cfccb8e..851a5d6d79 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") |