bug #132278, r=dbaron, sr=vidur, a=asa, make |nsCOMPtr::operator&()| legal again

This commit is contained in:
scc%mozilla.org 2002-03-22 00:05:16 +00:00
Родитель 319946f8c3
Коммит 0b992232af
1 изменённых файлов: 0 добавлений и 50 удалений

Просмотреть файл

@ -682,31 +682,6 @@ class nsCOMPtr
#endif // CANT_RESOLVE_CPP_CONST_AMBIGUITY
// This is going to become private soon, once all users of
// nsCOMPtr stop using it. It may even become:
// void operator&() const {}
private:
const nsCOMPtr<T>*
operator&() const
// This is private to prevent accidental use of |operator&|
// instead of |getter_AddRefs|, which can happen if the result
// is cast.
// To pass an nsCOMPtr as an out parameter to a function, either
// (preferably) pass by reference or use |address_of|.
{
return this;
}
nsCOMPtr<T>*
operator&()
// This version is also needed so things will compile before
// all the uses are removed and we make it private. After it's
// private, we won't need two anymore.
{
return this;
}
public:
nsDerivedSafe<T>&
operator*() const
@ -903,31 +878,6 @@ class nsCOMPtr<nsISupports>
#endif // CANT_RESOLVE_CPP_CONST_AMBIGUITY
// This is going to become private soon, once all users of
// nsCOMPtr stop using it. It may even become:
// void operator&() const {}
private:
const nsCOMPtr<nsISupports>*
operator&() const
// This is private to prevent accidental use of |operator&|
// instead of |getter_AddRefs|, which can happen if the result
// is cast.
// To pass an nsCOMPtr as an out parameter to a function, either
// (preferably) pass by reference or use |address_of|.
{
return this;
}
nsCOMPtr<nsISupports>*
operator&()
// This version is also needed so things will compile before
// all the uses are removed and we make it private. After it's
// private, we won't need two anymore.
{
return this;
}
public:
nsDerivedSafe<nsISupports>&