summaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-11-09 14:53:58 +0000
committerPedro Alves <palves@redhat.com>2016-11-09 14:53:58 +0000
commit7a63494a0df60cf71b9cf03c4eb8f24719d03e66 (patch)
tree5b59f39a837aaa33f12ddb718499ad44c8a1650f /gdb/tracepoint.c
parent8c84bffb45ac63b98fffc5c1a492c2eb7e4f27e2 (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 3d28606eab..2a40b16755 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);