mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
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:
parent
835e1550cb
commit
932187b05a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user