Bug 212919 - Fix const issues in nsDataHashtable on MSVC7 (I'm surprised other
compilers didn't barf already!) r=swalker sr=scc a=asa
This commit is contained in:
Родитель
327f6d529a
Коммит
1eecf09f3f
|
@ -62,7 +62,7 @@ private:
|
|||
typedef typename KeyClass::KeyTypePointer KeyTypePointer;
|
||||
|
||||
nsBaseHashtableET(KeyTypePointer aKey);
|
||||
nsBaseHashtableET(const nsBaseHashtableET<KeyClass,DataType>& toCopy);
|
||||
nsBaseHashtableET(nsBaseHashtableET<KeyClass,DataType>& toCopy);
|
||||
~nsBaseHashtableET();
|
||||
};
|
||||
|
||||
|
@ -305,7 +305,7 @@ nsBaseHashtableET<KeyClass,DataType>::nsBaseHashtableET(KeyTypePointer aKey) :
|
|||
|
||||
template<class KeyClass,class DataType>
|
||||
nsBaseHashtableET<KeyClass,DataType>::nsBaseHashtableET
|
||||
(const nsBaseHashtableET<KeyClass,DataType>& toCopy) :
|
||||
(nsBaseHashtableET<KeyClass,DataType>& toCopy) :
|
||||
KeyClass(toCopy),
|
||||
mData(toCopy.mData)
|
||||
{ }
|
||||
|
|
|
@ -387,9 +387,12 @@ nsTHashtable<EntryType>::s_CopyEntry(PLDHashTable *table,
|
|||
const PLDHashEntryHdr *from,
|
||||
PLDHashEntryHdr *to)
|
||||
{
|
||||
new(to) EntryType(* NS_REINTERPRET_CAST(const EntryType*,from));
|
||||
EntryType* fromEntry =
|
||||
NS_CONST_CAST(EntryType*, NS_REINTERPRET_CAST(const EntryType*, from));
|
||||
|
||||
NS_CONST_CAST(EntryType*,NS_REINTERPRET_CAST(const EntryType*,from))->~EntryType();
|
||||
new(to) EntryType(*fromEntry);
|
||||
|
||||
fromEntry->~EntryType();
|
||||
}
|
||||
|
||||
template<class EntryType>
|
||||
|
|
Загрузка…
Ссылка в новой задаче