зеркало из https://github.com/mozilla/pjs.git
Remove GetKeyPointer method from nsTHashtable key types. b=374906 r=bsmedberg
This commit is contained in:
Родитель
73302aee8a
Коммит
cb52af13a3
|
@ -82,7 +82,6 @@ public:
|
|||
~nsVoidHashKey() { }
|
||||
|
||||
KeyType GetKey() const { return mValue; }
|
||||
KeyTypePointer GetKeyPointer() const { return mValue; }
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return aKey == mValue; }
|
||||
|
||||
static KeyTypePointer KeyToPointer(KeyType aKey) { return aKey; }
|
||||
|
|
|
@ -115,11 +115,6 @@ public:
|
|||
return mKey;
|
||||
}
|
||||
|
||||
KeyTypePointer GetKeyPointer() const
|
||||
{
|
||||
return mKey;
|
||||
}
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const
|
||||
{
|
||||
PRBool eq;
|
||||
|
|
|
@ -92,7 +92,6 @@ public:
|
|||
~nsAttrHashKey() {}
|
||||
|
||||
KeyType GetKey() const { return mKey; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mKey; }
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const
|
||||
{
|
||||
return mKey.mLocalName == aKey->mLocalName &&
|
||||
|
|
|
@ -159,7 +159,6 @@ class nsUint32ToContentHashEntry : public PLDHashEntryHdr
|
|||
~nsUint32ToContentHashEntry() { Destroy(); }
|
||||
|
||||
KeyType GetKey() const { return mValue; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mValue; }
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return mValue == *aKey; }
|
||||
|
||||
|
|
|
@ -92,10 +92,6 @@ public:
|
|||
{
|
||||
return mKey;
|
||||
}
|
||||
KeyTypePointer GetKeyPointer() const
|
||||
{
|
||||
return mKey;
|
||||
}
|
||||
PRBool KeyEquals(KeyType aKey) const
|
||||
{
|
||||
return mKey->Equals(*aKey);
|
||||
|
|
|
@ -107,7 +107,6 @@ public:
|
|||
~nsStringCaseInsensitiveHashKey() { }
|
||||
|
||||
KeyType GetKey() const { return mStr; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mStr; }
|
||||
PRBool KeyEquals(const KeyTypePointer aKey) const
|
||||
{
|
||||
return mStr.Equals(*aKey,nsCaseInsensitiveStringComparator());
|
||||
|
|
|
@ -84,7 +84,6 @@ class nsMorkReader
|
|||
~IDKey() { }
|
||||
|
||||
KeyType GetKey() const { return mStr; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mStr; }
|
||||
PRBool KeyEquals(const KeyTypePointer aKey) const
|
||||
{
|
||||
return mStr.Equals(*aKey);
|
||||
|
|
|
@ -83,11 +83,6 @@ public:
|
|||
return mHost;
|
||||
}
|
||||
|
||||
KeyTypePointer GetKeyPointer() const
|
||||
{
|
||||
return mHost;
|
||||
}
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const
|
||||
{
|
||||
return !strcmp(mHost, aKey);
|
||||
|
|
|
@ -60,7 +60,6 @@ class nsPtrHashKey : public PLDHashEntryHdr
|
|||
~nsPtrHashKey() {}
|
||||
|
||||
KeyType GetKey() const { return mKey; }
|
||||
KeyTypePointer GetKeyPointer() const { return mKey; }
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer key) const { return key == mKey; }
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ public:
|
|||
}
|
||||
|
||||
KeyType GetKey() const { return mKey; }
|
||||
KeyTypePointer GetKeyPointer() const { return mKey; }
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return !nsCRT::strcmp(mKey, aKey); }
|
||||
static KeyTypePointer KeyToPointer(KeyType aKey) { return aKey; }
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ public:
|
|||
// Override, since we want to compare font names as case insensitive
|
||||
PRBool KeyEquals(const KeyTypePointer aKey) const
|
||||
{
|
||||
return GetKeyPointer()->Equals(*aKey, nsCaseInsensitiveStringComparator());
|
||||
return GetKey().Equals(*aKey, nsCaseInsensitiveStringComparator());
|
||||
}
|
||||
static PLDHashNumber HashKey(const KeyTypePointer aKey)
|
||||
{
|
||||
|
|
|
@ -124,7 +124,6 @@ protected:
|
|||
~FontGroupAndStringHashKeyT() { }
|
||||
|
||||
KeyType GetKey() const { return mObj; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mObj; }
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const {
|
||||
return
|
||||
|
|
|
@ -177,7 +177,6 @@ private:
|
|||
~FontAndFamilyKey() { }
|
||||
|
||||
KeyType GetKey() const { return mObj; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mObj; }
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const {
|
||||
return
|
||||
|
|
|
@ -163,7 +163,6 @@ public:
|
|||
~FunctionKey() { }
|
||||
|
||||
KeyType GetKey() const { return mF; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mF; }
|
||||
PRBool KeyEquals(const KeyTypePointer aKey) const
|
||||
{
|
||||
return mF == *aKey;
|
||||
|
|
|
@ -242,7 +242,6 @@ public:
|
|||
~JavaClassMemberKey() { }
|
||||
|
||||
KeyType GetKey() const { return mValue; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mValue; }
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return aKey->clazz == mValue.clazz && aKey->memberID == mValue.memberID; }
|
||||
|
||||
static KeyTypePointer KeyToPointer(KeyType aKey) { return &aKey; }
|
||||
|
|
|
@ -59,7 +59,6 @@ public:
|
|||
~nsURIHashKey() { MOZ_COUNT_DTOR(nsURIHashKey); }
|
||||
|
||||
nsIURI* GetKey() const { return mKey; }
|
||||
const nsIURI* GetKeyPointer() const { return mKey; }
|
||||
|
||||
PRBool KeyEquals(const nsIURI* aKey) const {
|
||||
PRBool eq;
|
||||
|
|
|
@ -108,11 +108,6 @@ class nsCookieEntry : public PLDHashEntryHdr
|
|||
return HostPtr();
|
||||
}
|
||||
|
||||
KeyTypePointer GetKeyPointer() const
|
||||
{
|
||||
return HostPtr();
|
||||
}
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const
|
||||
{
|
||||
return !strcmp(HostPtr(), aKey);
|
||||
|
|
|
@ -79,7 +79,6 @@ public:
|
|||
~nsTrimInt64HashKey() { }
|
||||
|
||||
KeyType GetKey() const { return mValue; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mValue; }
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return *aKey == mValue; }
|
||||
|
||||
static KeyTypePointer KeyToPointer(KeyType aKey) { return &aKey; }
|
||||
|
|
|
@ -90,7 +90,6 @@ public:
|
|||
~nsStringHashKey() { }
|
||||
|
||||
KeyType GetKey() const { return mStr; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mStr; }
|
||||
PRBool KeyEquals(const KeyTypePointer aKey) const
|
||||
{
|
||||
return mStr.Equals(*aKey);
|
||||
|
@ -123,7 +122,6 @@ public:
|
|||
~nsCStringHashKey() { }
|
||||
|
||||
KeyType GetKey() const { return mStr; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mStr; }
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return mStr.Equals(*aKey); }
|
||||
|
||||
|
@ -154,7 +152,6 @@ public:
|
|||
~nsUint32HashKey() { }
|
||||
|
||||
KeyType GetKey() const { return mValue; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mValue; }
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return *aKey == mValue; }
|
||||
|
||||
static KeyTypePointer KeyToPointer(KeyType aKey) { return &aKey; }
|
||||
|
@ -183,7 +180,6 @@ public:
|
|||
~nsISupportsHashKey() { }
|
||||
|
||||
KeyType GetKey() const { return mSupports; }
|
||||
KeyTypePointer GetKeyPointer() const { return mSupports; }
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return aKey == mSupports; }
|
||||
|
||||
|
@ -216,7 +212,6 @@ public:
|
|||
~nsVoidPtrHashKey() { }
|
||||
|
||||
KeyType GetKey() const { return mKey; }
|
||||
KeyTypePointer GetKeyPointer() const { return mKey; }
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return aKey == mKey; }
|
||||
|
||||
|
@ -252,7 +247,6 @@ public:
|
|||
~nsClearingVoidPtrHashKey() { mKey = NULL; }
|
||||
|
||||
KeyType GetKey() const { return mKey; }
|
||||
KeyTypePointer GetKeyPointer() const { return mKey; }
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return aKey == mKey; }
|
||||
|
||||
|
@ -283,7 +277,6 @@ public:
|
|||
~nsIDHashKey() { }
|
||||
|
||||
KeyType GetKey() const { return mID; }
|
||||
KeyTypePointer GetKeyPointer() const { return &mID; }
|
||||
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return aKey->Equals(mID); }
|
||||
|
||||
|
@ -316,7 +309,6 @@ public:
|
|||
~nsDepCharHashKey() { }
|
||||
|
||||
const char* GetKey() const { return mKey; }
|
||||
const char* GetKeyPointer() const { return mKey; }
|
||||
PRBool KeyEquals(const char* aKey) const
|
||||
{
|
||||
return !strcmp(mKey, aKey);
|
||||
|
@ -346,7 +338,6 @@ public:
|
|||
~nsCharPtrHashKey() { if (mKey) free(NS_CONST_CAST(char *, mKey)); }
|
||||
|
||||
const char* GetKey() const { return mKey; }
|
||||
const char* GetKeyPointer() const { return mKey; }
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const
|
||||
{
|
||||
return !strcmp(mKey, aKey);
|
||||
|
@ -377,7 +368,6 @@ public:
|
|||
~nsUnicharPtrHashKey() { if (mKey) NS_Free(NS_CONST_CAST(PRUnichar *, mKey)); }
|
||||
|
||||
const PRUnichar* GetKey() const { return mKey; }
|
||||
const PRUnichar* GetKeyPointer() const { return mKey; }
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const
|
||||
{
|
||||
return !NS_strcmp(mKey, aKey);
|
||||
|
@ -408,7 +398,6 @@ public:
|
|||
~nsHashableHashKey() { }
|
||||
|
||||
nsIHashable* GetKey() const { return mKey; }
|
||||
const nsIHashable* GetKeyPointer() const { return mKey; }
|
||||
|
||||
PRBool KeyEquals(const nsIHashable* aKey) const {
|
||||
PRBool eq;
|
||||
|
|
|
@ -82,9 +82,6 @@ PL_DHashStubEnumRemove(PLDHashTable *table,
|
|||
* // the destructor must be defined... or you will cause link errors!
|
||||
* ~EntryType();
|
||||
*
|
||||
* // return the key of this entry
|
||||
* const KeyTypePointer GetKeyPointer() const;
|
||||
*
|
||||
* // KeyEquals(): does this entry match this key?
|
||||
* PRBool KeyEquals(KeyTypePointer aKey) const;
|
||||
*
|
||||
|
|
|
@ -103,7 +103,6 @@ public:
|
|||
EntityToUnicodeEntry(const EntityToUnicodeEntry& aEntry) { mNode = aEntry.mNode; }
|
||||
~EntityToUnicodeEntry() { };
|
||||
|
||||
const char* GetKeyPointer() const { return mNode->mStr; }
|
||||
PRBool KeyEquals(const char* aEntity) const { return !strcmp(mNode->mStr, aEntity); }
|
||||
static const char* KeyToPointer(const char* aEntity) { return aEntity; }
|
||||
static PLDHashNumber HashKey(const char* aEntity) { return HashString(aEntity); }
|
||||
|
|
Загрузка…
Ссылка в новой задаче