diff options
author | Tom Tromey <tom@tromey.com> | 2024-02-03 14:32:06 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-02-04 15:37:55 -0700 |
commit | b36a26343a6c62b313d9e101b369155b6b799535 (patch) | |
tree | c5a73b5832f4ccbb914626230e2aeac11db0ab59 /gdb/xcoffread.c | |
parent | 029e52bac7f3a6dd8b39f7f3d298b73174da806b (diff) | |
download | gdb-b36a26343a6c62b313d9e101b369155b6b799535.zip gdb-b36a26343a6c62b313d9e101b369155b6b799535.tar.gz 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/xcoffread.c')
-rw-r--r-- | gdb/xcoffread.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 589208c..e324f4e 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -428,8 +428,7 @@ arrange_linetable (std::vector<linetable_entry> &old_linetable) if (old_linetable[ii].line == 0) { /* Function entry found. */ - fentries.emplace_back (); - linetable_entry &e = fentries.back (); + linetable_entry &e = fentries.emplace_back (); e.line = ii; e.is_stmt = true; e.set_unrelocated_pc (old_linetable[ii].unrelocated_pc ()); |