This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[review] Replace bsearch with a std::lower_bound-based search
- From: "Christian Biesinger (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Christian Biesinger <cbiesinger at google dot com>, gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at sourceware dot org>
- Date: Tue, 29 Oct 2019 15:07:04 -0400
- Subject: [review] Replace bsearch with a std::lower_bound-based search
- Auto-submitted: auto-generated
- References: <gerrit.1572317588000.I07e0a0e333f4062b27fc68d3a3f24881ebc68fd4@gnutoolchain-gerrit.osci.io>
- Reply-to: gnutoolchain-gerrit at osci dot io
Christian Biesinger has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/403
......................................................................
Patch Set 1:
(1 comment)
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/403/1/gdb/gdbsupport/gdb_binary_search.h
File gdb/gdbsupport/gdb_binary_search.h:
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/403/1/gdb/gdbsupport/gdb_binary_search.h@44
PS1, Line 44:
36 | b, respectively.
37 | [first, last) must be sorted.
38 |
39 | The return value is an iterator pointing to the found element, or LAST if
40 | no element was found. */
41 | template<typename It, typename T, typename Comp>
42 | It binary_search (It first, It last, T el, Comp comp)
43 | {
44 | auto lt = [&] (const typename std::iterator_traits<It>::value_type& a,
45 | const T& b)
> The "&"s are in the wrong spots here.
Thanks, done.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I07e0a0e333f4062b27fc68d3a3f24881ebc68fd4
Gerrit-Change-Number: 403
Gerrit-PatchSet: 1
Gerrit-Owner: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Tue, 29 Oct 2019 19:07:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: comment