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 10af1b919d
commit 76e67e1aae
12 changed files with 19 additions and 19 deletions

View File

@ -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();

View File

@ -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);

View File

@ -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() { }

View File

@ -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.

View File

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

View File

@ -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); }

View File

@ -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; }

View File

@ -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);

View File

@ -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)

View File

@ -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);

View File

@ -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);

View File

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