From 341ebb19f1c55554080014e1456bcc423902ff68 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 10 Oct 2014 17:28:35 -0400 Subject: [PATCH] Bug 1087306 - Fix some more bad implicit constructors in accessible; r=tbsaunde --- accessible/generic/Accessible.h | 2 +- accessible/generic/BaseAccessibles.h | 2 +- accessible/ipc/DocAccessibleChild.h | 2 +- accessible/ipc/DocAccessibleParent.h | 2 +- accessible/xpcom/xpcAccessibleApplication.h | 3 ++- accessible/xpcom/xpcAccessibleDocument.h | 2 +- accessible/xpcom/xpcAccessibleGeneric.h | 2 +- accessible/xpcom/xpcAccessibleHyperText.h | 3 ++- accessible/xpcom/xpcAccessibleImage.h | 3 ++- accessible/xpcom/xpcAccessibleTable.h | 3 ++- accessible/xpcom/xpcAccessibleTableCell.h | 3 ++- 11 files changed, 16 insertions(+), 11 deletions(-) diff --git a/accessible/generic/Accessible.h b/accessible/generic/Accessible.h index dee1cd8cb0b6..b1009074b782 100644 --- a/accessible/generic/Accessible.h +++ b/accessible/generic/Accessible.h @@ -1180,7 +1180,7 @@ private: class AutoTreeMutation { public: - AutoTreeMutation(Accessible* aRoot, bool aInvalidationRequired = true) : + explicit AutoTreeMutation(Accessible* aRoot, bool aInvalidationRequired = true) : mInvalidationRequired(aInvalidationRequired), mRoot(aRoot) { MOZ_ASSERT(!(mRoot->mStateFlags & Accessible::eSubtreeMutating)); diff --git a/accessible/generic/BaseAccessibles.h b/accessible/generic/BaseAccessibles.h index 9f5b18a0f490..4a4ca0da8bcb 100644 --- a/accessible/generic/BaseAccessibles.h +++ b/accessible/generic/BaseAccessibles.h @@ -118,7 +118,7 @@ protected: class DummyAccessible : public AccessibleWrap { public: - DummyAccessible(DocAccessible* aDocument = nullptr) : + explicit DummyAccessible(DocAccessible* aDocument = nullptr) : AccessibleWrap(nullptr, aDocument) { } virtual uint64_t NativeState() MOZ_OVERRIDE MOZ_FINAL; diff --git a/accessible/ipc/DocAccessibleChild.h b/accessible/ipc/DocAccessibleChild.h index 9baa1e08f9e7..d70f30eccbb4 100644 --- a/accessible/ipc/DocAccessibleChild.h +++ b/accessible/ipc/DocAccessibleChild.h @@ -22,7 +22,7 @@ class AccShowEvent; class DocAccessibleChild : public PDocAccessibleChild { public: - DocAccessibleChild(DocAccessible* aDoc) : + explicit DocAccessibleChild(DocAccessible* aDoc) : mDoc(aDoc) { MOZ_COUNT_CTOR(DocAccessibleChild); } ~DocAccessibleChild() diff --git a/accessible/ipc/DocAccessibleParent.h b/accessible/ipc/DocAccessibleParent.h index b92a5e0ac127..c654c4ef9c64 100644 --- a/accessible/ipc/DocAccessibleParent.h +++ b/accessible/ipc/DocAccessibleParent.h @@ -101,7 +101,7 @@ private: class ProxyEntry : public PLDHashEntryHdr { public: - ProxyEntry(const void*) : mProxy(nullptr) {} + explicit ProxyEntry(const void*) : mProxy(nullptr) {} ProxyEntry(ProxyEntry&& aOther) : mProxy(aOther.mProxy) { aOther.mProxy = nullptr; } ~ProxyEntry() { delete mProxy; } diff --git a/accessible/xpcom/xpcAccessibleApplication.h b/accessible/xpcom/xpcAccessibleApplication.h index 18de89b0235c..2548ea21ab8b 100644 --- a/accessible/xpcom/xpcAccessibleApplication.h +++ b/accessible/xpcom/xpcAccessibleApplication.h @@ -21,7 +21,8 @@ class xpcAccessibleApplication : public xpcAccessibleGeneric, public nsIAccessibleApplication { public: - xpcAccessibleApplication(Accessible* aIntl) : xpcAccessibleGeneric(aIntl) { } + explicit xpcAccessibleApplication(Accessible* aIntl) : + xpcAccessibleGeneric(aIntl) { } NS_DECL_ISUPPORTS_INHERITED diff --git a/accessible/xpcom/xpcAccessibleDocument.h b/accessible/xpcom/xpcAccessibleDocument.h index 8cb3732ccabd..c918ecbe2cdd 100644 --- a/accessible/xpcom/xpcAccessibleDocument.h +++ b/accessible/xpcom/xpcAccessibleDocument.h @@ -24,7 +24,7 @@ class xpcAccessibleDocument : public xpcAccessibleHyperText, public nsIAccessibleDocument { public: - xpcAccessibleDocument(DocAccessible* aIntl) : + explicit xpcAccessibleDocument(DocAccessible* aIntl) : xpcAccessibleHyperText(aIntl), mCache(kDefaultCacheLength) { } NS_DECL_ISUPPORTS_INHERITED diff --git a/accessible/xpcom/xpcAccessibleGeneric.h b/accessible/xpcom/xpcAccessibleGeneric.h index 811581822600..c028d2677ff1 100644 --- a/accessible/xpcom/xpcAccessibleGeneric.h +++ b/accessible/xpcom/xpcAccessibleGeneric.h @@ -26,7 +26,7 @@ class xpcAccessibleGeneric : public xpcAccessible, public xpcAccessibleValue { public: - xpcAccessibleGeneric(Accessible* aInternal) : + explicit xpcAccessibleGeneric(Accessible* aInternal) : mIntl(aInternal), mSupportedIfaces(0) { if (mIntl->IsSelect()) diff --git a/accessible/xpcom/xpcAccessibleHyperText.h b/accessible/xpcom/xpcAccessibleHyperText.h index 1e7abe79fa5e..56157e7249d4 100644 --- a/accessible/xpcom/xpcAccessibleHyperText.h +++ b/accessible/xpcom/xpcAccessibleHyperText.h @@ -23,7 +23,8 @@ class xpcAccessibleHyperText : public xpcAccessibleGeneric, public nsIAccessibleHyperText { public: - xpcAccessibleHyperText(Accessible* aIntl) : xpcAccessibleGeneric(aIntl) + explicit xpcAccessibleHyperText(Accessible* aIntl) : + xpcAccessibleGeneric(aIntl) { if (mIntl->IsHyperText() && mIntl->AsHyperText()->IsTextRole()) mSupportedIfaces |= eText; diff --git a/accessible/xpcom/xpcAccessibleImage.h b/accessible/xpcom/xpcAccessibleImage.h index c53b656ef12a..ca6058cc56c5 100644 --- a/accessible/xpcom/xpcAccessibleImage.h +++ b/accessible/xpcom/xpcAccessibleImage.h @@ -18,7 +18,8 @@ class xpcAccessibleImage : public xpcAccessibleGeneric, public nsIAccessibleImage { public: - xpcAccessibleImage(Accessible* aIntl) : xpcAccessibleGeneric(aIntl) { } + explicit xpcAccessibleImage(Accessible* aIntl) : + xpcAccessibleGeneric(aIntl) { } NS_DECL_ISUPPORTS_INHERITED diff --git a/accessible/xpcom/xpcAccessibleTable.h b/accessible/xpcom/xpcAccessibleTable.h index 9f22bdfc2771..79a3135d7706 100644 --- a/accessible/xpcom/xpcAccessibleTable.h +++ b/accessible/xpcom/xpcAccessibleTable.h @@ -20,7 +20,8 @@ class xpcAccessibleTable : public xpcAccessibleGeneric, public nsIAccessibleTable { public: - xpcAccessibleTable(Accessible* aIntl) : xpcAccessibleGeneric(aIntl) { } + explicit xpcAccessibleTable(Accessible* aIntl) : + xpcAccessibleGeneric(aIntl) { } NS_DECL_ISUPPORTS_INHERITED diff --git a/accessible/xpcom/xpcAccessibleTableCell.h b/accessible/xpcom/xpcAccessibleTableCell.h index cc22ed4d5aac..20140c0e449c 100644 --- a/accessible/xpcom/xpcAccessibleTableCell.h +++ b/accessible/xpcom/xpcAccessibleTableCell.h @@ -21,7 +21,8 @@ class xpcAccessibleTableCell : public xpcAccessibleHyperText, public nsIAccessibleTableCell { public: - xpcAccessibleTableCell(Accessible* aIntl) : xpcAccessibleHyperText(aIntl) { } + explicit xpcAccessibleTableCell(Accessible* aIntl) : + xpcAccessibleHyperText(aIntl) { } NS_DECL_ISUPPORTS_INHERITED