Skip to content

Commit

Permalink
Bug 1634281 - Make nsDataHashtable a type alias. r=xpcom-reviewers,nika
Browse files Browse the repository at this point in the history
  • Loading branch information
sigiesec committed Mar 4, 2021
1 parent 6da5224 commit 3004f1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
17 changes: 0 additions & 17 deletions xpcom/ds/nsDataHashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,4 @@
// Not used here, but included for convenience.
#include "nsHashKeys.h"

/**
* templated hashtable class maps keys to simple datatypes.
* See nsBaseHashtable for complete declaration
* @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h
* for a complete specification.
* @param DataType the simple datatype being wrapped
* @see nsInterfaceHashtable, nsClassHashtable
*
* XXX This could be made a type alias instead of a subclass, but all forward
* declarations must be adjusted.
*/
template <class KeyClass, class DataType>
class nsDataHashtable : public nsBaseHashtable<KeyClass, DataType, DataType> {
public:
using nsBaseHashtable<KeyClass, DataType, DataType>::nsBaseHashtable;
};

#endif // nsDataHashtable_h__
10 changes: 9 additions & 1 deletion xpcom/ds/nsHashtablesFwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,16 @@ class nsBaseHashtable;
template <class KeyClass, class T>
class nsClassHashtable;

/**
* templated hashtable class maps keys to simple datatypes.
* See nsBaseHashtable for complete declaration
* @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h
* for a complete specification.
* @param DataType the simple datatype being wrapped
* @see nsInterfaceHashtable, nsClassHashtable
*/
template <class KeyClass, class DataType>
class nsDataHashtable;
using nsDataHashtable = nsBaseHashtable<KeyClass, DataType, DataType>;

template <class KeyClass, class Interface>
class nsInterfaceHashtable;
Expand Down

0 comments on commit 3004f1f

Please sign in to comment.