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 219206 fd7ac314f246e6ac0351e057e79114c9dd3b50ba
parent 219205 d4648d3adef9c36cd4dbe587acdc90ba2e1b6518
child 219207 ccd27160dd9796a14a6caf52c1eda00d69463826
push id27958
push userkwierso@gmail.com
push dateFri, 12 Dec 2014 01:30:39 +0000
treeherdermozilla-central@5288b15d22de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1109729
milestone37.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 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()