mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 968012, part 3 - Remove nsVoidKey which was only used by nsWindowDataSource. r=froydnj
This commit is contained in:
parent
a1eec40a19
commit
6e0dc8af13
@ -258,43 +258,6 @@ public:
|
||||
uint32_t GetValue() { return mKey; }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsVoidKey: Where keys are void* objects that don't get refcounted.
|
||||
|
||||
class nsVoidKey : public nsHashKey {
|
||||
protected:
|
||||
void* mKey;
|
||||
|
||||
public:
|
||||
nsVoidKey(const nsVoidKey& aKey) : mKey(aKey.mKey) {
|
||||
#ifdef DEBUG
|
||||
mKeyType = aKey.mKeyType;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsVoidKey(void* key) {
|
||||
#ifdef DEBUG
|
||||
mKeyType = VoidKey;
|
||||
#endif
|
||||
mKey = key;
|
||||
}
|
||||
|
||||
uint32_t HashCode(void) const {
|
||||
return NS_PTR_TO_INT32(mKey);
|
||||
}
|
||||
|
||||
bool Equals(const nsHashKey *aKey) const {
|
||||
NS_ASSERTION(aKey->GetKeyType() == VoidKey, "mismatched key types");
|
||||
return (mKey == ((const nsVoidKey *) aKey)->mKey);
|
||||
}
|
||||
|
||||
nsHashKey *Clone() const {
|
||||
return new nsVoidKey(mKey);
|
||||
}
|
||||
|
||||
void* GetValue() { return mKey; }
|
||||
};
|
||||
|
||||
// for null-terminated c-strings
|
||||
class nsCStringKey : public nsHashKey {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user