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


Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/403
......................................................................


Patch Set 1: Code-Review+2

(1 comment)

Thank you for the patch.

I found one nit.  The patch is ok with this fixed.
No need to re-review.

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.



-- 
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: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Tue, 29 Oct 2019 19:00:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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