summaryrefslogtreecommitdiff
path: root/gr-qtgui/lib/edit_box_msg_impl.cc
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2019-08-17 17:41:00 +0200
committerMarcus Müller <marcus@hostalia.de>2019-08-22 15:05:58 +0200
commitc6cb3bbc35153a9635d69eddab0d252f7441b854 (patch)
treef9ab04c336fa6f228ce0c7b90c3722955a1aa53f /gr-qtgui/lib/edit_box_msg_impl.cc
parentbcf35e64b5662f716e0de59e95fdd9ffb02238a7 (diff)
Use emplace_back(params) instead of push_back(type(params))
This is C++11: you can convert std::vector<complextype> vec; vec.push_back(complextype(foo, bar, baz)); by std::vector<complextype> vec; vec.emplace_back(foo, bar, baz); which saves one unnecessary copy. This mostly happened in rpc code. The automated clang-tidy check failed miserably, so most of this was done by hand.
Diffstat (limited to 'gr-qtgui/lib/edit_box_msg_impl.cc')
-rw-r--r--gr-qtgui/lib/edit_box_msg_impl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gr-qtgui/lib/edit_box_msg_impl.cc b/gr-qtgui/lib/edit_box_msg_impl.cc
index 4b38a59004..0339276276 100644
--- a/gr-qtgui/lib/edit_box_msg_impl.cc
+++ b/gr-qtgui/lib/edit_box_msg_impl.cc
@@ -492,7 +492,7 @@ void edit_box_msg_impl::edit_finished()
if (conv_ok) {
if (even) {
im = t;
- xv.push_back(gr_complex(re, im));
+ xv.emplace_back(re, im);
even = false;
} else {
re = t;