diff options
author | Marcus Müller <mueller@kit.edu> | 2018-02-20 13:03:12 +0100 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-02-23 19:06:50 +0100 |
commit | 9b63bb4f4a52c172ea8f4ebf8e0577cf101da69c (patch) | |
tree | 51c03403bf33ceb33a29d3e3917082d5bb4bd439 /gr-qtgui/lib/edit_box_msg_impl.h | |
parent | 28401b7a01d9e6f25c6057f7b9dc07c8e568ff60 (diff) |
qtgui: 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-qtgui/lib/edit_box_msg_impl.h')
-rw-r--r-- | gr-qtgui/lib/edit_box_msg_impl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gr-qtgui/lib/edit_box_msg_impl.h b/gr-qtgui/lib/edit_box_msg_impl.h index c60b3de9b0..35e86f79e9 100644 --- a/gr-qtgui/lib/edit_box_msg_impl.h +++ b/gr-qtgui/lib/edit_box_msg_impl.h @@ -55,6 +55,7 @@ namespace gr { QComboBox *d_type_box; pmt::pmt_t d_msg; + const pmt::pmt_t d_port; public: edit_box_msg_impl(gr::qtgui::data_type_t type, |