зеркало из https://github.com/mozilla/gecko-dev.git
Bug 573210 - Consistently qualify accesses to dependent base classes in xpcom C++ code. r=dbaron
This commit is contained in:
Родитель
bb378f154e
Коммит
683883e106
|
@ -301,7 +301,7 @@ public:
|
|||
}
|
||||
ThisClass& operator=(RawRef aRefToCopy)
|
||||
{
|
||||
own(aRefToCopy);
|
||||
this->own(aRefToCopy);
|
||||
SafeAddRef();
|
||||
return *this;
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ protected:
|
|||
void SafeAddRef()
|
||||
{
|
||||
if (this->HaveResource())
|
||||
AddRef(this->get());
|
||||
this->AddRef(this->get());
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -690,7 +690,7 @@ protected:
|
|||
void SafeRelease()
|
||||
{
|
||||
if (this->HaveResource())
|
||||
Release(this->get());
|
||||
this->Release(this->get());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ public:
|
|||
*/
|
||||
PRBool Get(KeyType aKey, UserDataType* pData NS_OUTPARAM) const
|
||||
{
|
||||
EntryType* ent = GetEntry(aKey);
|
||||
EntryType* ent = this->GetEntry(aKey);
|
||||
|
||||
if (!ent)
|
||||
return PR_FALSE;
|
||||
|
@ -145,7 +145,7 @@ public:
|
|||
*/
|
||||
UserDataType Get(KeyType aKey) const
|
||||
{
|
||||
EntryType* ent = GetEntry(aKey);
|
||||
EntryType* ent = this->GetEntry(aKey);
|
||||
if (!ent)
|
||||
return NULL;
|
||||
|
||||
|
@ -160,7 +160,7 @@ public:
|
|||
*/
|
||||
PRBool Put(KeyType aKey, UserDataType aData)
|
||||
{
|
||||
EntryType* ent = PutEntry(aKey);
|
||||
EntryType* ent = this->PutEntry(aKey);
|
||||
|
||||
if (!ent)
|
||||
return PR_FALSE;
|
||||
|
@ -174,7 +174,7 @@ public:
|
|||
* remove the data for the associated key
|
||||
* @param aKey the key to remove from the hashtable
|
||||
*/
|
||||
void Remove(KeyType aKey) { RemoveEntry(aKey); }
|
||||
void Remove(KeyType aKey) { this->RemoveEntry(aKey); }
|
||||
|
||||
/**
|
||||
* function type provided by the application for enumeration.
|
||||
|
|
|
@ -57,6 +57,7 @@ class nsClassHashtable :
|
|||
public:
|
||||
typedef typename KeyClass::KeyType KeyType;
|
||||
typedef T* UserDataType;
|
||||
typedef nsBaseHashtable< KeyClass, nsAutoPtr<T>, T* > base_type;
|
||||
|
||||
/**
|
||||
* @copydoc nsBaseHashtable::Get
|
||||
|
@ -80,6 +81,7 @@ class nsClassHashtableMT :
|
|||
public:
|
||||
typedef typename KeyClass::KeyType KeyType;
|
||||
typedef T* UserDataType;
|
||||
typedef nsBaseHashtableMT< KeyClass, nsAutoPtr<T>, T* > base_type;
|
||||
|
||||
/**
|
||||
* @copydoc nsBaseHashtable::Get
|
||||
|
@ -97,8 +99,7 @@ template<class KeyClass,class T>
|
|||
PRBool
|
||||
nsClassHashtable<KeyClass,T>::Get(KeyType aKey, T** retVal) const
|
||||
{
|
||||
typename nsBaseHashtable<KeyClass,nsAutoPtr<T>,T*>::EntryType* ent =
|
||||
GetEntry(aKey);
|
||||
typename base_type::EntryType* ent = this->GetEntry(aKey);
|
||||
|
||||
if (ent)
|
||||
{
|
||||
|
@ -125,8 +126,7 @@ nsClassHashtableMT<KeyClass,T>::Get(KeyType aKey, T** retVal) const
|
|||
{
|
||||
PR_Lock(this->mLock);
|
||||
|
||||
typename nsBaseHashtableMT<KeyClass,nsAutoPtr<T>,T*>::EntryType* ent =
|
||||
GetEntry(aKey);
|
||||
typename base_type::EntryType* ent = this->GetEntry(aKey);
|
||||
|
||||
if (ent)
|
||||
{
|
||||
|
|
|
@ -57,6 +57,8 @@ class nsInterfaceHashtable :
|
|||
public:
|
||||
typedef typename KeyClass::KeyType KeyType;
|
||||
typedef Interface* UserDataType;
|
||||
typedef nsBaseHashtable< KeyClass, nsCOMPtr<Interface> , Interface* >
|
||||
base_type;
|
||||
|
||||
/**
|
||||
* @copydoc nsBaseHashtable::Get
|
||||
|
@ -87,6 +89,8 @@ class nsInterfaceHashtableMT :
|
|||
public:
|
||||
typedef typename KeyClass::KeyType KeyType;
|
||||
typedef Interface* UserDataType;
|
||||
typedef nsBaseHashtableMT< KeyClass, nsCOMPtr<Interface> , Interface* >
|
||||
base_type;
|
||||
|
||||
/**
|
||||
* @copydoc nsBaseHashtable::Get
|
||||
|
@ -110,8 +114,7 @@ PRBool
|
|||
nsInterfaceHashtable<KeyClass,Interface>::Get
|
||||
(KeyType aKey, UserDataType* pInterface) const
|
||||
{
|
||||
typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
|
||||
GetEntry(aKey);
|
||||
typename base_type::EntryType* ent = this->GetEntry(aKey);
|
||||
|
||||
if (ent)
|
||||
{
|
||||
|
@ -138,8 +141,7 @@ Interface*
|
|||
nsInterfaceHashtable<KeyClass,Interface>::GetWeak
|
||||
(KeyType aKey, PRBool* aFound) const
|
||||
{
|
||||
typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
|
||||
GetEntry(aKey);
|
||||
typename base_type::EntryType* ent = this->GetEntry(aKey);
|
||||
|
||||
if (ent)
|
||||
{
|
||||
|
@ -166,8 +168,7 @@ nsInterfaceHashtableMT<KeyClass,Interface>::Get
|
|||
{
|
||||
PR_Lock(this->mLock);
|
||||
|
||||
typename nsBaseHashtableMT<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
|
||||
GetEntry(aKey);
|
||||
typename base_type::EntryType* ent = this->GetEntry(aKey);
|
||||
|
||||
if (ent)
|
||||
{
|
||||
|
|
|
@ -58,6 +58,7 @@ class nsRefPtrHashtable :
|
|||
public:
|
||||
typedef typename KeyClass::KeyType KeyType;
|
||||
typedef RefPtr* UserDataType;
|
||||
typedef nsBaseHashtable< KeyClass, nsRefPtr<RefPtr> , RefPtr* > base_type;
|
||||
|
||||
/**
|
||||
* @copydoc nsBaseHashtable::Get
|
||||
|
@ -88,6 +89,7 @@ class nsRefPtrHashtableMT :
|
|||
public:
|
||||
typedef typename KeyClass::KeyType KeyType;
|
||||
typedef RefPtr* UserDataType;
|
||||
typedef nsBaseHashtableMT< KeyClass, nsRefPtr<RefPtr> , RefPtr* > base_type;
|
||||
|
||||
/**
|
||||
* @copydoc nsBaseHashtable::Get
|
||||
|
@ -111,8 +113,7 @@ PRBool
|
|||
nsRefPtrHashtable<KeyClass,RefPtr>::Get
|
||||
(KeyType aKey, UserDataType* pRefPtr) const
|
||||
{
|
||||
typename nsBaseHashtable<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
|
||||
GetEntry(aKey);
|
||||
typename base_type::EntryType* ent = this->GetEntry(aKey);
|
||||
|
||||
if (ent)
|
||||
{
|
||||
|
@ -139,8 +140,7 @@ RefPtr*
|
|||
nsRefPtrHashtable<KeyClass,RefPtr>::GetWeak
|
||||
(KeyType aKey, PRBool* aFound) const
|
||||
{
|
||||
typename nsBaseHashtable<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
|
||||
GetEntry(aKey);
|
||||
typename base_type::EntryType* ent = this->GetEntry(aKey);
|
||||
|
||||
if (ent)
|
||||
{
|
||||
|
@ -167,8 +167,7 @@ nsRefPtrHashtableMT<KeyClass,RefPtr>::Get
|
|||
{
|
||||
PR_Lock(this->mLock);
|
||||
|
||||
typename nsBaseHashtableMT<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
|
||||
GetEntry(aKey);
|
||||
typename base_type::EntryType* ent = this->GetEntry(aKey);
|
||||
|
||||
if (ent)
|
||||
{
|
||||
|
|
|
@ -64,13 +64,13 @@ class nsTPtrArray : public nsTArray<E*> {
|
|||
|
||||
// Initialize this array and pre-allocate some number of elements.
|
||||
explicit nsTPtrArray(size_type capacity) {
|
||||
SetCapacity(capacity);
|
||||
this->SetCapacity(capacity);
|
||||
}
|
||||
|
||||
// The array's copy-constructor performs a 'deep' copy of the given array.
|
||||
// @param other The array object to copy.
|
||||
nsTPtrArray(const self_type& other) {
|
||||
AppendElements(other);
|
||||
this->AppendElements(other);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Загрузка…
Ссылка в новой задаче