Bug 1061009 - Fix more bad implicit constructors in a11y; r=tbsaunde

This commit is contained in:
Ehsan Akhgari 2014-09-02 12:19:58 -04:00
parent ea4448cfdf
commit 847854bef9
12 changed files with 19 additions and 19 deletions

View File

@ -234,7 +234,7 @@ uint8_t AttrCharacteristicsFor(nsIAtom* aAtom);
class AttrIterator class AttrIterator
{ {
public: public:
AttrIterator(nsIContent* aContent) : explicit AttrIterator(nsIContent* aContent) :
mContent(aContent), mAttrIdx(0) mContent(aContent), mAttrIdx(0)
{ {
mAttrCount = mContent->GetAttrCount(); mAttrCount = mContent->GetAttrCount();

View File

@ -81,7 +81,7 @@ public:
protected: protected:
// Make sure it's used by Accessible class only. // Make sure it's used by Accessible class only.
EmbeddedObjCollector(Accessible* aRoot) : explicit EmbeddedObjCollector(Accessible* aRoot) :
AccCollector(aRoot, filters::GetEmbeddedObject) { } AccCollector(aRoot, filters::GetEmbeddedObject) { }
virtual void AppendObject(Accessible* aAccessible); virtual void AppendObject(Accessible* aAccessible);

View File

@ -52,7 +52,7 @@ private:
struct IteratorState struct IteratorState
{ {
IteratorState(Accessible* aParent, IteratorState* mParentState = nullptr); explicit IteratorState(Accessible* aParent, IteratorState* mParentState = nullptr);
Accessible* mParent; Accessible* mParent;
int32_t mIndex; int32_t mIndex;
@ -254,7 +254,7 @@ private:
class SingleAccIterator : public AccIterable class SingleAccIterator : public AccIterable
{ {
public: public:
SingleAccIterator(Accessible* aTarget): mAcc(aTarget) { } explicit SingleAccIterator(Accessible* aTarget): mAcc(aTarget) { }
virtual ~SingleAccIterator() { } virtual ~SingleAccIterator() { }
virtual Accessible* Next(); virtual Accessible* Next();
@ -274,7 +274,7 @@ private:
class ItemIterator : public AccIterable class ItemIterator : public AccIterable
{ {
public: public:
ItemIterator(Accessible* aItemContainer) : explicit ItemIterator(Accessible* aItemContainer) :
mContainer(aItemContainer), mAnchor(nullptr) { } mContainer(aItemContainer), mAnchor(nullptr) { }
virtual ~ItemIterator() { } virtual ~ItemIterator() { }

View File

@ -19,7 +19,7 @@ class DocAccessible;
class EventQueue class EventQueue
{ {
protected: protected:
EventQueue(DocAccessible* aDocument) : mDocument(aDocument) { } explicit EventQueue(DocAccessible* aDocument) : mDocument(aDocument) { }
/** /**
* Put an accessible event into the queue to process it later. * Put an accessible event into the queue to process it later.

View File

@ -275,8 +275,8 @@ private:
typedef T* KeyType; typedef T* KeyType;
typedef const T* KeyTypePointer; typedef const T* KeyTypePointer;
nsCOMPtrHashKey(const T* aKey) : mKey(const_cast<T*>(aKey)) {} explicit nsCOMPtrHashKey(const T* aKey) : mKey(const_cast<T*>(aKey)) {}
nsCOMPtrHashKey(const nsPtrHashKey<T> &aToCopy) : mKey(aToCopy.mKey) {} explicit nsCOMPtrHashKey(const nsPtrHashKey<T> &aToCopy) : mKey(aToCopy.mKey) {}
~nsCOMPtrHashKey() { } ~nsCOMPtrHashKey() { }
KeyType GetKey() const { return mKey; } KeyType GetKey() const { return mKey; }

View File

@ -23,10 +23,10 @@ class Relation
public: public:
Relation() : mFirstIter(nullptr), mLastIter(nullptr) { } Relation() : mFirstIter(nullptr), mLastIter(nullptr) { }
Relation(AccIterable* aIter) : explicit Relation(AccIterable* aIter) :
mFirstIter(aIter), mLastIter(aIter) { } mFirstIter(aIter), mLastIter(aIter) { }
Relation(Accessible* aAcc) : explicit Relation(Accessible* aAcc) :
mFirstIter(nullptr), mLastIter(nullptr) mFirstIter(nullptr), mLastIter(nullptr)
{ AppendTarget(aAcc); } { AppendTarget(aAcc); }

View File

@ -34,7 +34,7 @@ public:
/** /**
* Constructor. Used to expose default text attributes. * Constructor. Used to expose default text attributes.
*/ */
TextAttrsMgr(HyperTextAccessible* aHyperTextAcc) : explicit TextAttrsMgr(HyperTextAccessible* aHyperTextAcc) :
mOffsetAcc(nullptr), mHyperTextAcc(aHyperTextAcc), mOffsetAcc(nullptr), mHyperTextAcc(aHyperTextAcc),
mOffsetAccIdx(-1), mIncludeDefAttrs(true) { } mOffsetAccIdx(-1), mIncludeDefAttrs(true) { }
@ -126,7 +126,7 @@ protected:
class TTextAttr : public TextAttr class TTextAttr : public TextAttr
{ {
public: public:
TTextAttr(bool aGetRootValue) : mGetRootValue(aGetRootValue) {} explicit TTextAttr(bool aGetRootValue) : mGetRootValue(aGetRootValue) {}
// TextAttr // TextAttr
virtual void Expose(nsIPersistentProperties* aAttributes, virtual void Expose(nsIPersistentProperties* aAttributes,
@ -393,7 +393,7 @@ protected:
{ {
public: public:
TextDecorValue() { } TextDecorValue() { }
TextDecorValue(nsIFrame* aFrame); explicit TextDecorValue(nsIFrame* aFrame);
nscolor Color() const { return mColor; } nscolor Color() const { return mColor; }
uint8_t Style() const { return mStyle; } uint8_t Style() const { return mStyle; }

View File

@ -19,8 +19,8 @@ using namespace mozilla::a11y;
class RuleCache class RuleCache
{ {
public: public:
RuleCache(nsIAccessibleTraversalRule* aRule) : mRule(aRule), explicit RuleCache(nsIAccessibleTraversalRule* aRule) : mRule(aRule),
mAcceptRoles(nullptr) { } mAcceptRoles(nullptr) { }
~RuleCache () { ~RuleCache () {
if (mAcceptRoles) if (mAcceptRoles)
nsMemory::Free(mAcceptRoles); nsMemory::Free(mAcceptRoles);

View File

@ -25,7 +25,7 @@ class nsAccessiblePivot MOZ_FINAL : public nsIAccessiblePivot
public: public:
typedef mozilla::a11y::Accessible Accessible; typedef mozilla::a11y::Accessible Accessible;
nsAccessiblePivot(Accessible* aRoot); explicit nsAccessiblePivot(Accessible* aRoot);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsAccessiblePivot, nsIAccessiblePivot) NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsAccessiblePivot, nsIAccessiblePivot)

View File

@ -21,7 +21,7 @@ class TableAccessible;
class xpcAccessibleTable class xpcAccessibleTable
{ {
public: public:
xpcAccessibleTable(mozilla::a11y::TableAccessible* aTable) : mTable(aTable) { } explicit xpcAccessibleTable(mozilla::a11y::TableAccessible* aTable) : mTable(aTable) { }
nsresult GetCaption(nsIAccessible** aCaption); nsresult GetCaption(nsIAccessible** aCaption);
nsresult GetSummary(nsAString& aSummary); nsresult GetSummary(nsAString& aSummary);

View File

@ -25,7 +25,7 @@ class TableCellAccessible;
class xpcAccessibleTableCell class xpcAccessibleTableCell
{ {
public: public:
xpcAccessibleTableCell(mozilla::a11y::TableCellAccessible* aTableCell) : explicit xpcAccessibleTableCell(mozilla::a11y::TableCellAccessible* aTableCell) :
mTableCell(aTableCell) { } mTableCell(aTableCell) { }
nsresult GetTable(nsIAccessibleTable** aTable); nsresult GetTable(nsIAccessibleTable** aTable);

View File

@ -61,7 +61,7 @@ public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLETEXTRANGE_IMPL_IID) NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLETEXTRANGE_IMPL_IID)
private: private:
xpcAccessibleTextRange(TextRange&& aRange) : explicit xpcAccessibleTextRange(TextRange&& aRange) :
mRange(Forward<TextRange>(aRange)) {} mRange(Forward<TextRange>(aRange)) {}
xpcAccessibleTextRange() {} xpcAccessibleTextRange() {}