Bug 1048240 - Fix more bad implicit constructors in accessible; r=tbsaunde
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 05 Aug 2014 17:57:52 -0400
changeset 219686 cbfe7963a7a5f3905f03edfccd08eb4df0e5e495
parent 219685 2af2a0050c300bbb82d06135b485b6b7d29ef789
child 219687 5405cd1684fd9629833c4aa3d867c7fbeaf24c93
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1048240
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1048240 - Fix more bad implicit constructors in accessible; r=tbsaunde
accessible/base/AccEvent.h
accessible/generic/Accessible.h
--- a/accessible/base/AccEvent.h
+++ b/accessible/base/AccEvent.h
@@ -286,17 +286,17 @@ public:
 
 
 /**
  * Class for reorder accessible event. Takes care about
  */
 class AccReorderEvent : public AccEvent
 {
 public:
-  AccReorderEvent(Accessible* aTarget) :
+  explicit AccReorderEvent(Accessible* aTarget) :
     AccEvent(::nsIAccessibleEvent::EVENT_REORDER, aTarget,
              eAutoDetect, eCoalesceReorder) { }
   virtual ~AccReorderEvent() { }
 
   // Event
   static const EventGroup kEventGroup = eReorderEvent;
   virtual unsigned int GetEventGroups() const
   {
@@ -494,17 +494,17 @@ private:
 };
 
 /**
  * Downcast the generic accessible event object to derived type.
  */
 class downcast_accEvent
 {
 public:
-  downcast_accEvent(AccEvent* e) : mRawPtr(e) { }
+  explicit downcast_accEvent(AccEvent* e) : mRawPtr(e) { }
 
   template<class Destination>
   operator Destination*() {
     if (!mRawPtr)
       return nullptr;
 
     return mRawPtr->GetEventGroups() & (1U << Destination::kEventGroup) ?
       static_cast<Destination*>(mRawPtr) : nullptr;
--- a/accessible/generic/Accessible.h
+++ b/accessible/generic/Accessible.h
@@ -91,17 +91,17 @@ struct GroupPos
 };
 
 /**
  * An index type. Assert if out of range value was attempted to be used.
  */
 class index_t
 {
 public:
-  index_t(int32_t aVal) : mVal(aVal) {}
+  MOZ_IMPLICIT index_t(int32_t aVal) : mVal(aVal) {}
 
   operator uint32_t() const
   {
     MOZ_ASSERT(mVal >= 0, "Attempt to use wrong index!");
     return mVal;
   }
 
   bool IsValid() const { return mVal >= 0; }