From 02767a1d4f961e38a2abd3361ed987bf88cade00 Mon Sep 17 00:00:00 2001 From: "jkeiser%netscape.com" Date: Sat, 5 Apr 2003 00:16:32 +0000 Subject: [PATCH] Warning fixes (bug 200709), patch by bsmedberg@covad.net, r=jkeiser@netscape.com, sr=alecf@netscape.com --- xpcom/ds/nsBaseHashtableImpl.h | 2 +- xpcom/ds/nsHashKeys.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xpcom/ds/nsBaseHashtableImpl.h b/xpcom/ds/nsBaseHashtableImpl.h index c4df9e39ffdd..943adb0759cf 100644 --- a/xpcom/ds/nsBaseHashtableImpl.h +++ b/xpcom/ds/nsBaseHashtableImpl.h @@ -207,7 +207,7 @@ PLDHashOperator nsBaseHashtable::s_EnumReadStub (PLDHashTable *table, PLDHashEntryHdr *hdr, PRUint32 number, void* arg) { - EntryType* ent = (EntryType*) hdr; + EntryType* ent = NS_STATIC_CAST(EntryType*, hdr); s_EnumReadArgs* eargs = (s_EnumReadArgs*) arg; PLDHashOperator res = (eargs->func)(ent->GetKey(), ent->mData, eargs->userArg); diff --git a/xpcom/ds/nsHashKeys.h b/xpcom/ds/nsHashKeys.h index a079dbbfc489..22bfde6cc882 100644 --- a/xpcom/ds/nsHashKeys.h +++ b/xpcom/ds/nsHashKeys.h @@ -69,7 +69,7 @@ * * @see nsTHashtable::EntryType for specification */ -class NS_COM nsStringHashKey : protected PLDHashEntryHdr +class NS_COM nsStringHashKey : public PLDHashEntryHdr { public: typedef const nsAString& KeyType; @@ -102,7 +102,7 @@ private: * * @see nsTHashtable::EntryType for specification */ -class NS_COM nsCStringHashKey : protected PLDHashEntryHdr +class NS_COM nsCStringHashKey : public PLDHashEntryHdr { public: typedef const nsACString& KeyType; @@ -133,10 +133,10 @@ private: * * @see nsTHashtable::EntryType for specification */ -class NS_COM nsUint32HashKey : protected PLDHashEntryHdr +class NS_COM nsUint32HashKey : public PLDHashEntryHdr { public: - typedef PRUint32 KeyType; + typedef const PRUint32& KeyType; typedef const PRUint32* KeyTypePointer; nsUint32HashKey(KeyTypePointer aKey) : mValue(*aKey) { } @@ -160,7 +160,7 @@ private: * * @see nsTHashtable::EntryType for specification */ -class NS_COM nsISupportsHashKey : protected PLDHashEntryHdr +class NS_COM nsISupportsHashKey : public PLDHashEntryHdr { public: typedef nsISupports* KeyType; @@ -192,7 +192,7 @@ private: * * @see nsTHashtable::EntryType for specification */ -class NS_COM nsIDHashKey : protected PLDHashEntryHdr +class NS_COM nsIDHashKey : public PLDHashEntryHdr { public: typedef const nsID& KeyType;