diff options
author | Pedro Alves <palves@redhat.com> | 2016-11-09 14:53:58 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-11-09 14:53:58 +0000 |
commit | 7a63494a0df60cf71b9cf03c4eb8f24719d03e66 (patch) | |
tree | 5b59f39a837aaa33f12ddb718499ad44c8a1650f /gdb/tracepoint.c | |
parent | 8c84bffb45ac63b98fffc5c1a492c2eb7e4f27e2 (diff) | |
download | binutils-gdb-7a63494a0df60cf71b9cf03c4eb8f24719d03e66.tar.gz |
gdb: Use vector::emplace_back
Now that we require C++11, we can use vector::emplace_back to
construct elements in place instead of constructing and then copying.
gdb/ChangeLog:
2016-11-09 Pedro Alves <palves@redhat.com>
* main.c (struct cmdarg): Add constructor.
(captured_main_1): Use vector::emplace_back.
* tracepoint.c (collection_list::add_memrange): Likewise.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r-- | gdb/tracepoint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 3d28606eab1..2a40b167558 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -919,7 +919,7 @@ collection_list::add_memrange (int type, bfd_signed_vma base, /* type: memrange_absolute == memory, other n == basereg */ /* base: addr if memory, offset if reg relative. */ /* len: we actually save end (base + len) for convenience */ - m_memranges.push_back (memrange (type, base, base + len)); + m_memranges.emplace_back (type, base, base + len); if (type != memrange_absolute) /* Better collect the base register! */ add_register (type); |