зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1196451 - tweak comment in nsRefPtr.h to be more clear; r=botond
DONTBUILD because this is a comment-only fix.
This commit is contained in:
Родитель
02ece3e234
Коммит
c3c08f5b75
|
@ -348,12 +348,14 @@ public:
|
||||||
private:
|
private:
|
||||||
// This helper class makes |nsRefPtr<const T>| possible by casting away
|
// This helper class makes |nsRefPtr<const T>| possible by casting away
|
||||||
// the constness from the pointer when calling AddRef() and Release().
|
// the constness from the pointer when calling AddRef() and Release().
|
||||||
|
//
|
||||||
// This is necessary because AddRef() and Release() implementations can't
|
// This is necessary because AddRef() and Release() implementations can't
|
||||||
// generally expected to be const themselves (without heavy use of |mutable|
|
// generally expected to be const themselves (without heavy use of |mutable|
|
||||||
// and |const_cast| in their own implementations).
|
// and |const_cast| in their own implementations).
|
||||||
// This should be sound because while |nsRefPtr<const T>| provides a const
|
//
|
||||||
// view of an object, the object itself should be const (it would have to be
|
// This should be sound because while |nsRefPtr<const T>| provides a
|
||||||
// allocated as |new const T| or similar to itself be const).
|
// const view of an object, the object itself should not be const (it
|
||||||
|
// would have to be allocated as |new const T| or similar to be const).
|
||||||
template<class U>
|
template<class U>
|
||||||
struct AddRefTraits
|
struct AddRefTraits
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче