mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 19:46:09 +08:00
Change program_space_empty_p to method on program_space
This changes program_space_empty_p to be a method on program_space. It also changes it to return bool. I removed the "_p" suffix because "empty" is a "well-known" C++ method name. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * inferior.c (delete_inferior): Update. * progspace.c (program_space::empty): Rename from program_space_empty_p. Return bool. * progspace.h (struct program_space) <empty>: New method. (program_space_empty_p): Don't declare.
This commit is contained in:
@ -280,13 +280,10 @@ set_current_program_space (struct program_space *pspace)
|
||||
|
||||
/* Returns true iff there's no inferior bound to PSPACE. */
|
||||
|
||||
int
|
||||
program_space_empty_p (struct program_space *pspace)
|
||||
bool
|
||||
program_space::empty ()
|
||||
{
|
||||
if (find_inferior_for_program_space (pspace) != NULL)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
return find_inferior_for_program_space (this) == nullptr;
|
||||
}
|
||||
|
||||
/* Prints the list of program spaces and their details on UIOUT. If
|
||||
|
Reference in New Issue
Block a user