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:
Tom Tromey
2020-10-29 15:04:33 -06:00
parent e39fb97114
commit 004eecfdc7
4 changed files with 16 additions and 10 deletions

View File

@@ -175,7 +175,7 @@ delete_inferior (struct inferior *todel)
gdb::observers::inferior_removed.notify (inf);
/* If this program space is rendered useless, remove it. */
if (program_space_empty_p (inf->pspace))
if (inf->pspace->empty ())
delete inf->pspace;
delete inf;