[review v2] Replace some more qsort calls with std::sort

Tom Tromey (Code Review)
2019-10-19T20:43:07Z

Tom Tromey has posted comments on this change.

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

Patch Set 2: Code-Review+2

(2 comments)

Thank you. I think this is ok now.

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/131/1/gdb/breakpoint.c
File gdb/breakpoint.c:

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/131/1/gdb/breakpoint.c@522
PS1, Line 522: /* Array is sorted by bp_location_is_less_than - primarily by the ADDRESS. */
> Tom, I have made a change that should make the line length 80 columns for all users that haven't set […]
Thanks to both of you. Simon, I had already modified my settings, just FYI.

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/131/1/gdb/breakpoint.c@11462
PS1, Line 11462: return (a > b) < (a < b);
> Done.
>
> I wonder why this code wasn't just subtracting one variable from the other in all these cases.

Probably due to fear of underflow.