Bug 1055517 - Fix some more bad implicit constructors in XPCOM; r=froydnj
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 19 Aug 2014 15:11:22 -0400
changeset 214769 d70904f0973911153ef2db4e057e7c4225b282bd
parent 214768 6613f71f4f900e92111ec0cde31c35f27962e5e4
child 214770 50076ac32c9e8147e9de8b3e48cb768fac0f7e04
push idunknown
push userunknown
push dateunknown
reviewersfroydnj
bugs1055517
milestone34.0a1
Bug 1055517 - Fix some more bad implicit constructors in XPCOM; r=froydnj
xpcom/glue/DeadlockDetector.h
xpcom/glue/nsTPriorityQueue.h
--- a/xpcom/glue/DeadlockDetector.h
+++ b/xpcom/glue/DeadlockDetector.h
@@ -78,17 +78,17 @@ private:
    * Value type for the ordering table.  Contains the other
    * resources on which an ordering constraint |key < other|
    * exists.  The catch is that we also store the calling context at
    * which the other resource was acquired; this improves the
    * quality of error messages when potential deadlock is detected.
    */
   struct OrderingEntry
   {
-    OrderingEntry(const T* aResource)
+    explicit OrderingEntry(const T* aResource)
       : mOrderedLT()        // FIXME bug 456272: set to empirical dep size?
       , mExternalRefs()
       , mResource(aResource)
     {
     }
     ~OrderingEntry()
     {
     }
--- a/xpcom/glue/nsTPriorityQueue.h
+++ b/xpcom/glue/nsTPriorityQueue.h
@@ -26,17 +26,17 @@ public:
    * constructor for type Compare.
    */
   nsTPriorityQueue() : mCompare(Compare()) {}
 
   /**
    * Constructor to allow a specific instance of a comparator object to be
    * used.
    */
-  nsTPriorityQueue(const Compare& aComp) : mCompare(aComp) {}
+  explicit nsTPriorityQueue(const Compare& aComp) : mCompare(aComp) {}
 
   /**
    * Copy constructor
    */
   nsTPriorityQueue(const nsTPriorityQueue& aOther)
     : mElements(aOther.mElements)
     , mCompare(aOther.mCompare)
   {