diff --git a/accessible/base/ARIAMap.h b/accessible/base/ARIAMap.h index 089689aa671..3b1c315fdf2 100644 --- a/accessible/base/ARIAMap.h +++ b/accessible/base/ARIAMap.h @@ -234,7 +234,7 @@ uint8_t AttrCharacteristicsFor(nsIAtom* aAtom); class AttrIterator { public: - AttrIterator(nsIContent* aContent) : + explicit AttrIterator(nsIContent* aContent) : mContent(aContent), mAttrIdx(0) { mAttrCount = mContent->GetAttrCount(); diff --git a/accessible/base/AccCollector.h b/accessible/base/AccCollector.h index 7cd1c5b74cf..b62219761f7 100644 --- a/accessible/base/AccCollector.h +++ b/accessible/base/AccCollector.h @@ -81,7 +81,7 @@ public: protected: // Make sure it's used by Accessible class only. - EmbeddedObjCollector(Accessible* aRoot) : + explicit EmbeddedObjCollector(Accessible* aRoot) : AccCollector(aRoot, filters::GetEmbeddedObject) { } virtual void AppendObject(Accessible* aAccessible); diff --git a/accessible/base/AccIterator.h b/accessible/base/AccIterator.h index 79d3deebffc..8fb761811c1 100644 --- a/accessible/base/AccIterator.h +++ b/accessible/base/AccIterator.h @@ -52,7 +52,7 @@ private: struct IteratorState { - IteratorState(Accessible* aParent, IteratorState* mParentState = nullptr); + explicit IteratorState(Accessible* aParent, IteratorState* mParentState = nullptr); Accessible* mParent; int32_t mIndex; @@ -254,7 +254,7 @@ private: class SingleAccIterator : public AccIterable { public: - SingleAccIterator(Accessible* aTarget): mAcc(aTarget) { } + explicit SingleAccIterator(Accessible* aTarget): mAcc(aTarget) { } virtual ~SingleAccIterator() { } virtual Accessible* Next(); @@ -274,7 +274,7 @@ private: class ItemIterator : public AccIterable { public: - ItemIterator(Accessible* aItemContainer) : + explicit ItemIterator(Accessible* aItemContainer) : mContainer(aItemContainer), mAnchor(nullptr) { } virtual ~ItemIterator() { } diff --git a/accessible/base/EventQueue.h b/accessible/base/EventQueue.h index a5457d5b0a5..73ad154daf2 100644 --- a/accessible/base/EventQueue.h +++ b/accessible/base/EventQueue.h @@ -19,7 +19,7 @@ class DocAccessible; class EventQueue { protected: - EventQueue(DocAccessible* aDocument) : mDocument(aDocument) { } + explicit EventQueue(DocAccessible* aDocument) : mDocument(aDocument) { } /** * Put an accessible event into the queue to process it later. diff --git a/accessible/base/NotificationController.h b/accessible/base/NotificationController.h index e4fdb23d70c..90b6dcb7b02 100644 --- a/accessible/base/NotificationController.h +++ b/accessible/base/NotificationController.h @@ -275,8 +275,8 @@ private: typedef T* KeyType; typedef const T* KeyTypePointer; - nsCOMPtrHashKey(const T* aKey) : mKey(const_cast(aKey)) {} - nsCOMPtrHashKey(const nsPtrHashKey &aToCopy) : mKey(aToCopy.mKey) {} + explicit nsCOMPtrHashKey(const T* aKey) : mKey(const_cast(aKey)) {} + explicit nsCOMPtrHashKey(const nsPtrHashKey &aToCopy) : mKey(aToCopy.mKey) {} ~nsCOMPtrHashKey() { } KeyType GetKey() const { return mKey; } diff --git a/accessible/base/Relation.h b/accessible/base/Relation.h index e81add9d3f2..1a9ac9cfed5 100644 --- a/accessible/base/Relation.h +++ b/accessible/base/Relation.h @@ -23,10 +23,10 @@ class Relation public: Relation() : mFirstIter(nullptr), mLastIter(nullptr) { } - Relation(AccIterable* aIter) : + explicit Relation(AccIterable* aIter) : mFirstIter(aIter), mLastIter(aIter) { } - Relation(Accessible* aAcc) : + explicit Relation(Accessible* aAcc) : mFirstIter(nullptr), mLastIter(nullptr) { AppendTarget(aAcc); } diff --git a/accessible/base/TextAttrs.h b/accessible/base/TextAttrs.h index 23d74bcfdb9..1c5d54c25fa 100644 --- a/accessible/base/TextAttrs.h +++ b/accessible/base/TextAttrs.h @@ -34,7 +34,7 @@ public: /** * Constructor. Used to expose default text attributes. */ - TextAttrsMgr(HyperTextAccessible* aHyperTextAcc) : + explicit TextAttrsMgr(HyperTextAccessible* aHyperTextAcc) : mOffsetAcc(nullptr), mHyperTextAcc(aHyperTextAcc), mOffsetAccIdx(-1), mIncludeDefAttrs(true) { } @@ -126,7 +126,7 @@ protected: class TTextAttr : public TextAttr { public: - TTextAttr(bool aGetRootValue) : mGetRootValue(aGetRootValue) {} + explicit TTextAttr(bool aGetRootValue) : mGetRootValue(aGetRootValue) {} // TextAttr virtual void Expose(nsIPersistentProperties* aAttributes, @@ -393,7 +393,7 @@ protected: { public: TextDecorValue() { } - TextDecorValue(nsIFrame* aFrame); + explicit TextDecorValue(nsIFrame* aFrame); nscolor Color() const { return mColor; } uint8_t Style() const { return mStyle; } diff --git a/accessible/base/nsAccessiblePivot.cpp b/accessible/base/nsAccessiblePivot.cpp index dcf9fcb3f78..27d42033210 100644 --- a/accessible/base/nsAccessiblePivot.cpp +++ b/accessible/base/nsAccessiblePivot.cpp @@ -19,8 +19,8 @@ using namespace mozilla::a11y; class RuleCache { public: - RuleCache(nsIAccessibleTraversalRule* aRule) : mRule(aRule), - mAcceptRoles(nullptr) { } + explicit RuleCache(nsIAccessibleTraversalRule* aRule) : mRule(aRule), + mAcceptRoles(nullptr) { } ~RuleCache () { if (mAcceptRoles) nsMemory::Free(mAcceptRoles); diff --git a/accessible/base/nsAccessiblePivot.h b/accessible/base/nsAccessiblePivot.h index 5bdabca0eab..c05b8022ea7 100644 --- a/accessible/base/nsAccessiblePivot.h +++ b/accessible/base/nsAccessiblePivot.h @@ -25,7 +25,7 @@ class nsAccessiblePivot MOZ_FINAL : public nsIAccessiblePivot public: typedef mozilla::a11y::Accessible Accessible; - nsAccessiblePivot(Accessible* aRoot); + explicit nsAccessiblePivot(Accessible* aRoot); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsAccessiblePivot, nsIAccessiblePivot) diff --git a/accessible/xpcom/xpcAccessibleTable.h b/accessible/xpcom/xpcAccessibleTable.h index 0b7dfff5df0..21d0d8e7472 100644 --- a/accessible/xpcom/xpcAccessibleTable.h +++ b/accessible/xpcom/xpcAccessibleTable.h @@ -21,7 +21,7 @@ class TableAccessible; class xpcAccessibleTable { public: - xpcAccessibleTable(mozilla::a11y::TableAccessible* aTable) : mTable(aTable) { } + explicit xpcAccessibleTable(mozilla::a11y::TableAccessible* aTable) : mTable(aTable) { } nsresult GetCaption(nsIAccessible** aCaption); nsresult GetSummary(nsAString& aSummary); diff --git a/accessible/xpcom/xpcAccessibleTableCell.h b/accessible/xpcom/xpcAccessibleTableCell.h index 0936b536247..7ac2fa3cb78 100644 --- a/accessible/xpcom/xpcAccessibleTableCell.h +++ b/accessible/xpcom/xpcAccessibleTableCell.h @@ -25,7 +25,7 @@ class TableCellAccessible; class xpcAccessibleTableCell { public: - xpcAccessibleTableCell(mozilla::a11y::TableCellAccessible* aTableCell) : + explicit xpcAccessibleTableCell(mozilla::a11y::TableCellAccessible* aTableCell) : mTableCell(aTableCell) { } nsresult GetTable(nsIAccessibleTable** aTable); diff --git a/accessible/xpcom/xpcAccessibleTextRange.h b/accessible/xpcom/xpcAccessibleTextRange.h index 8692de50fb4..480f80df52a 100644 --- a/accessible/xpcom/xpcAccessibleTextRange.h +++ b/accessible/xpcom/xpcAccessibleTextRange.h @@ -61,7 +61,7 @@ public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLETEXTRANGE_IMPL_IID) private: - xpcAccessibleTextRange(TextRange&& aRange) : + explicit xpcAccessibleTextRange(TextRange&& aRange) : mRange(Forward(aRange)) {} xpcAccessibleTextRange() {}