valops.c: Some more gdb::array_view
authorPedro Alves <palves@redhat.com>
Wed, 21 Nov 2018 11:55:14 +0000 (11:55 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 21 Nov 2018 12:11:45 +0000 (12:11 +0000)
commit85cca2bcbc7833b33d4b61d7b7e0e75b9afa063b
tree6914ec7e79f0c1450195d91a72d6fa732b00b043
parent82ceee50146563a61ed19f4ad585d39636a6dfa8
valops.c: Some more gdb::array_view

This commit replaces some more use of pointer+length pairs in the
overload resolution code with gdb::array_view.

find_oload_champ's interface is simplified/normalized: the xmethods
parameter is converted from std::vector to array pointer, and then the
num_fns parameter is always passed in, no matter the array which is
non-NULL.  I tweaked the formatting of callers a little bit here and
there so that the 3 optional parameters are all in the same line.  (I
tried making the 3 optional array parameters be array_views, but the
resulting code didn't look as nice.)

gdb/ChangeLog:
2018-11-21  Pedro Alves  <palves@redhat.com>

* valops.c (find_method_list): Replace pointer and length
parameters with an gdb::array_view.  Adjust.
(value_find_oload_method_list): Likewise.
(find_overload_match): Use gdb::array_view for methods list.
Adjust to find_oload_champ interface change.
(find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
gdb/ChangeLog
gdb/valops.c
This page took 0.025688 seconds and 4 git commands to generate.