diff options
author | Marcus Müller <mueller@kit.edu> | 2018-02-20 11:22:14 +0100 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-02-23 19:06:50 +0100 |
commit | 97f0d1cecf4a8cb82e8e16e4dfcac0589c5b56c7 (patch) | |
tree | e0ad2aba49c4ebcb8a8bbf9f6b65bc8a953c95e0 /gr-digital/lib/header_payload_demux_impl.h | |
parent | 2fc414578985b59c5bfbb15103f3c3677a1c6fdc (diff) |
blocks: 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/header_payload_demux_impl.h')
-rw-r--r-- | gr-digital/lib/header_payload_demux_impl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gr-digital/lib/header_payload_demux_impl.h b/gr-digital/lib/header_payload_demux_impl.h index 0a70e7da3e..dfadfd58e6 100644 --- a/gr-digital/lib/header_payload_demux_impl.h +++ b/gr-digital/lib/header_payload_demux_impl.h @@ -55,6 +55,8 @@ namespace gr { std::vector<pmt::pmt_t> d_special_tags; //!< List of special tags std::vector<pmt::pmt_t> d_special_tags_last_value; //!< The current value of the special tags + static const pmt::pmt_t s_msg_port_id; //!< Message Port Id + // Helper functions to make the state machine more readable //! Checks if there are enough items on the inputs and enough space on the output buffers to copy \p n_symbols symbols |