aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2024-02-03 14:32:06 -0700
committerTom Tromey <tom@tromey.com>2024-02-04 15:37:55 -0700
commitb36a26343a6c62b313d9e101b369155b6b799535 (patch)
treec5a73b5832f4ccbb914626230e2aeac11db0ab59 /gdb/windows-nat.c
parent029e52bac7f3a6dd8b39f7f3d298b73174da806b (diff)
downloadfsf-binutils-gdb-b36a26343a6c62b313d9e101b369155b6b799535.zip
fsf-binutils-gdb-b36a26343a6c62b313d9e101b369155b6b799535.tar.gz
fsf-binutils-gdb-b36a26343a6c62b313d9e101b369155b6b799535.tar.bz2
Use reference result of emplace_back
Starting with C++17, emplace_back returns a reference to the new object. This patch changes code that uses emplace_back followed by a call to back() to simply use this reference instead. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r--gdb/windows-nat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 6fdd1f3..48b0d10 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -887,8 +887,7 @@ windows_make_so (const char *name, LPVOID load_addr)
}
}
#endif
- windows_process.solibs.emplace_back ();
- windows_solib *so = &windows_process.solibs.back ();
+ windows_solib *so = &windows_process.solibs.emplace_back ();
so->load_addr = load_addr;
so->original_name = name;
#ifndef __CYGWIN__