Bug 1109729 - Fix more bad implicit constructors in mfbt; r=froydnj
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 10 Dec 2014 17:47:42 -0500
changeset 235944 fd7ac314f246e6ac0351e057e79114c9dd3b50ba
parent 235943 d4648d3adef9c36cd4dbe587acdc90ba2e1b6518
child 235945 ccd27160dd9796a14a6caf52c1eda00d69463826
push id7472
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 20:36:27 +0000
treeherdermozilla-aurora@300ca104f8fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1109729
milestone37.0a1
Bug 1109729 - Fix more bad implicit constructors in mfbt; r=froydnj
mfbt/SegmentedVector.h
--- a/mfbt/SegmentedVector.h
+++ b/mfbt/SegmentedVector.h
@@ -109,17 +109,17 @@ class SegmentedVector : private AllocPol
 
   typedef SegmentImpl<kSegmentCapacity> Segment;
 
 public:
   // The |aIdealSegmentSize| is only for sanity checking. If it's specified, we
   // check that the actual segment size is as close as possible to it. This
   // serves as a sanity check for SegmentedVectorCapacity's capacity
   // computation.
-  SegmentedVector(size_t aIdealSegmentSize = 0)
+  explicit SegmentedVector(size_t aIdealSegmentSize = 0)
   {
     // The difference between the actual segment size and the ideal segment
     // size should be less than the size of a single element... unless the
     // ideal size was too small, in which case the capacity should be one.
     MOZ_ASSERT_IF(
       aIdealSegmentSize != 0,
       (sizeof(Segment) > aIdealSegmentSize && kSegmentCapacity == 1) ||
       aIdealSegmentSize - sizeof(Segment) < sizeof(T));
@@ -187,17 +187,17 @@ public:
   //
   class IterImpl
   {
     friend class SegmentedVector;
 
     Segment* mSegment;
     size_t mIndex;
 
-    IterImpl(SegmentedVector* aVector)
+    explicit IterImpl(SegmentedVector* aVector)
       : mSegment(aVector->mSegments.getFirst())
       , mIndex(0)
     {}
 
   public:
     bool Done() const { return !mSegment; }
 
     T& Get()