summaryrefslogtreecommitdiff
path: root/gr-digital/lib/packet_headerparser_b_impl.h
diff options
context:
space:
mode:
authorMarcus Müller <mueller@kit.edu>2018-02-20 13:11:06 +0100
committerMarcus Müller <marcus@hostalia.de>2018-02-23 19:06:50 +0100
commit8508461a2358a183fc555568041faeebffa73f59 (patch)
tree859dfe5f2e97b120fd7ec2043e4bdafc819982ab /gr-digital/lib/packet_headerparser_b_impl.h
parent9b63bb4f4a52c172ea8f4ebf8e0577cf101da69c (diff)
digital: remove unnecessary call to pmt::intern at runtime
typical usage: message_port_pub(pmt::mp("out_port"), …) which is bad, as it implies hashing of a string, allocation of memory, deallocation, finding the hashed string in the table of interned strings and returning a unique pointer (which for reasons of PMT awesomeness isn't even unique) to the interned port name. Replacing all these port name ad hoc ::mp() calls by reusing one, private, port name member.
Diffstat (limited to 'gr-digital/lib/packet_headerparser_b_impl.h')
-rw-r--r--gr-digital/lib/packet_headerparser_b_impl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gr-digital/lib/packet_headerparser_b_impl.h b/gr-digital/lib/packet_headerparser_b_impl.h
index 41641eda4d..dcfb83a806 100644
--- a/gr-digital/lib/packet_headerparser_b_impl.h
+++ b/gr-digital/lib/packet_headerparser_b_impl.h
@@ -32,6 +32,8 @@ namespace gr {
private:
packet_header_default::sptr d_header_formatter;
+ const pmt::pmt_t d_port;
+
public:
packet_headerparser_b_impl(const gr::digital::packet_header_default::sptr &header_formatter);
~packet_headerparser_b_impl();