зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1322465 part 7 - Use explicit/MOZ_IMPLICIT for the unary constructors in media/. r=cpearce,Ehsan
MozReview-Commit-ID: Ln63tzmkynd --HG-- extra : rebase_source : 869cca55da15d2394411571f741d8ed2728c3265
This commit is contained in:
Родитель
0643b83e9b
Коммит
e551a0b979
|
@ -30,7 +30,7 @@ class VideoDecoder : public GMPVideoDecoder
|
|||
, public RefCounted
|
||||
{
|
||||
public:
|
||||
VideoDecoder(GMPVideoHost *aHostAPI);
|
||||
explicit VideoDecoder(GMPVideoHost *aHostAPI);
|
||||
|
||||
virtual void InitDecode(const GMPVideoCodec& aCodecSettings,
|
||||
const uint8_t* aCodecSpecific,
|
||||
|
|
|
@ -56,8 +56,8 @@ public:
|
|||
|
||||
CComPtr(const CComPtr& aOther) : mPtr(nullptr) { Set(aOther.Get()); }
|
||||
CComPtr() : mPtr(nullptr) { }
|
||||
CComPtr(T* const & aPtr) : mPtr(nullptr) { Set(aPtr); }
|
||||
CComPtr(const std::nullptr_t& aNullPtr) : mPtr(aNullPtr) { }
|
||||
MOZ_IMPLICIT CComPtr(T* const & aPtr) : mPtr(nullptr) { Set(aPtr); }
|
||||
MOZ_IMPLICIT CComPtr(const std::nullptr_t& aNullPtr) : mPtr(aNullPtr) { }
|
||||
T** operator&() { return &mPtr; }
|
||||
T* operator->(){ return mPtr; }
|
||||
operator T*() { return mPtr; }
|
||||
|
@ -178,7 +178,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
AutoPtr(Type* aPtr)
|
||||
explicit AutoPtr(Type* aPtr)
|
||||
: mPtr(aPtr)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -36,13 +36,13 @@ class DECLSPEC_UUID("0e9924bd-1cb8-48ad-ba31-2fb831b162be")
|
|||
{
|
||||
public:
|
||||
|
||||
EnumPins(BaseFilter* aFilter)
|
||||
explicit EnumPins(BaseFilter* aFilter)
|
||||
: mFilter(aFilter)
|
||||
, mRefCnt(0)
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
EnumPins(EnumPins* aEnumPins)
|
||||
explicit EnumPins(EnumPins* aEnumPins)
|
||||
: mFilter(aEnumPins->mFilter)
|
||||
, mNumPins(aEnumPins->mNumPins)
|
||||
, mPinIdx(aEnumPins->mPinIdx)
|
||||
|
|
|
@ -24,14 +24,14 @@ class DECLSPEC_UUID("4de7a03c-6c3f-4314-949a-ee7e1ad05083")
|
|||
{
|
||||
public:
|
||||
|
||||
EnumMediaTypes(BasePin* aPin)
|
||||
explicit EnumMediaTypes(BasePin* aPin)
|
||||
: mPin(aPin)
|
||||
, mIndex(0)
|
||||
, mRefCnt(0)
|
||||
{
|
||||
}
|
||||
|
||||
EnumMediaTypes(EnumMediaTypes* aEnum)
|
||||
explicit EnumMediaTypes(EnumMediaTypes* aEnum)
|
||||
: mPin(aEnum->mPin)
|
||||
, mIndex(aEnum->mIndex)
|
||||
, mRefCnt(0)
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
* CriticalSection
|
||||
* @param aName A name which can reference this monitor
|
||||
*/
|
||||
CriticalSection(const char* aName)
|
||||
explicit CriticalSection(const char* aName)
|
||||
{
|
||||
::InitializeCriticalSection(&mCriticalSection);
|
||||
}
|
||||
|
@ -78,16 +78,16 @@ public:
|
|||
* Constructor
|
||||
* The constructor aquires the given lock. The destructor
|
||||
* releases the lock.
|
||||
*
|
||||
* @param aCriticalSection A valid mozilla::CriticalSection*.
|
||||
*
|
||||
* @param aCriticalSection A valid mozilla::CriticalSection*.
|
||||
**/
|
||||
CriticalSectionAutoEnter(mozilla::CriticalSection &aCriticalSection) :
|
||||
explicit CriticalSectionAutoEnter(mozilla::CriticalSection &aCriticalSection) :
|
||||
mCriticalSection(&aCriticalSection)
|
||||
{
|
||||
assert(mCriticalSection);
|
||||
mCriticalSection->Enter();
|
||||
}
|
||||
|
||||
|
||||
~CriticalSectionAutoEnter(void)
|
||||
{
|
||||
mCriticalSection->Leave();
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace media {
|
|||
class MediaType : public AM_MEDIA_TYPE
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
MediaType();
|
||||
MediaType(const AM_MEDIA_TYPE* aMediaType);
|
||||
MediaType(const MediaType& aMediaType);
|
||||
explicit MediaType(const AM_MEDIA_TYPE* aMediaType);
|
||||
explicit MediaType(const MediaType& aMediaType);
|
||||
|
||||
~MediaType();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче