Bug 1212027 - part 6 - add an IsEmpty method to nsTHashtable; r=erahm

It's a little more convenient than checking Count(), and also gives
nsTHashtable the same interface as nsTArray (for this operation, at
least), which seems worthwhile.
This commit is contained in:
Nathan Froyd 2015-10-07 23:31:17 -04:00
parent 835e1550cb
commit 932187b05a

View File

@ -119,6 +119,11 @@ public:
*/
uint32_t Count() const { return mTable.EntryCount(); }
/**
* Return true if the hashtable is empty.
*/
bool IsEmpty() const { return Count() == 0; }
/**
* Get the entry associated with a key.
* @param aKey the key to retrieve