Bug 1322465 part 15 - Use explicit/MOZ_IMPLICIT for the unary constructors in xpcom/. r=bobowen,Ehsan

MozReview-Commit-ID: JtmtNbPwNOg

--HG--
extra : rebase_source : f877b0504c7106a0874b23b8cfc0eab12d610767
This commit is contained in:
Ting-Yu Chou 2016-12-16 16:01:11 +08:00
Родитель 9e66f3af06
Коммит 5f4802bf0b
3 изменённых файлов: 6 добавлений и 6 удалений

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

@ -19,7 +19,7 @@
class AutoCriticalSection
{
public:
AutoCriticalSection(LPCRITICAL_SECTION aSection)
explicit AutoCriticalSection(LPCRITICAL_SECTION aSection)
: mSection(aSection)
{
::EnterCriticalSection(mSection);
@ -150,7 +150,7 @@ protected:
{
}
nsSimpleRef(RawRef aRawRef) : mRawRef(aRawRef)
explicit nsSimpleRef(RawRef aRawRef) : mRawRef(aRawRef)
{
}
@ -219,7 +219,7 @@ public:
// nsAutoRef work as intention.
class nsHGLOBAL {
public:
nsHGLOBAL(HGLOBAL hGlobal) : m_hGlobal(hGlobal)
MOZ_IMPLICIT nsHGLOBAL(HGLOBAL hGlobal) : m_hGlobal(hGlobal)
{
}
@ -255,7 +255,7 @@ public:
// another specialization for nsAutoRefTraits.
class nsHPRINTER {
public:
nsHPRINTER(HANDLE hPrinter) : m_hPrinter(hPrinter)
MOZ_IMPLICIT nsHPRINTER(HANDLE hPrinter) : m_hPrinter(hPrinter)
{
}

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

@ -122,7 +122,7 @@ private:
#ifdef XP_WIN
struct VersionW
{
VersionW(const char16_t* aVersionStringW)
explicit VersionW(const char16_t* aVersionStringW)
{
versionContentW =
reinterpret_cast<char16_t*>(wcsdup(char16ptr_t(aVersionStringW)));

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

@ -16,7 +16,7 @@
class DriveMapping
{
public:
DriveMapping(const nsAString& aRemoteUNCPath);
explicit DriveMapping(const nsAString& aRemoteUNCPath);
~DriveMapping();
bool