This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[review] Replace bsearch with a std::lower_bound-based search


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]