]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Simplify use of map_matching_symbols in ada-lang.c
authorTom Tromey <tom@tromey.com>
Fri, 26 Mar 2021 19:44:24 +0000 (13:44 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 26 Mar 2021 19:44:24 +0000 (13:44 -0600)
commit2315bb2d5764527617aef124cbcd52a13395e245
tree3edccb0a2a94e2f1988b8d5f2b119d71420b0d34
parente2cd5ca40c03271aa0bf324cac1f7a66ad3904d8
Simplify use of map_matching_symbols in ada-lang.c

I noticed that ada-lang.c creates a lambda to call
aux_add_nonlocal_symbols.  However, this code can be simplified a bit
by changing match_data to implement operator(), and then simply
passing the object as the callback.  That is what this patch
implements.

gdb/ChangeLog
2021-03-26  Tom Tromey  <tom@tromey.com>

* ada-lang.c (struct match_data): Add operator().
(match_data::operator()): Rename from aux_add_nonlocal_symbols.
(callback): Remove 'callback'.
gdb/ChangeLog
gdb/ada-lang.c