mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
Use an iterator range for 'using' directives
This patch changes block::get_using to return an iterator range. This seemed cleaner to me than the current approach of returning a pointer to the first using directive; all the callers actually use this to iterate.
This commit is contained in:
@@ -1390,7 +1390,6 @@ add_symbol_overload_list_using (const char *func_name,
|
||||
const char *the_namespace,
|
||||
std::vector<symbol *> *overload_list)
|
||||
{
|
||||
struct using_direct *current;
|
||||
const struct block *block;
|
||||
|
||||
/* First, go through the using directives. If any of them apply,
|
||||
@@ -1400,9 +1399,7 @@ add_symbol_overload_list_using (const char *func_name,
|
||||
for (block = get_selected_block (0);
|
||||
block != NULL;
|
||||
block = block->superblock ())
|
||||
for (current = block->get_using ();
|
||||
current != NULL;
|
||||
current = current->next)
|
||||
for (using_direct *current : block->get_using ())
|
||||
{
|
||||
/* Prevent recursive calls. */
|
||||
if (current->searched)
|
||||
|
||||
Reference in New Issue
Block a user