Bug 1061049 - Fix some bad impliciti constructors in RDF; r=bsmedberg
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 02 Sep 2014 18:21:23 -0400
changeset 226501 1d4cf18b141183102b5e5b9958def19a64d325a8
parent 226500 41954931b34e1f113651e53154d315acd59e18c8
child 226502 df899ce52dea6d608362efd29e1c19ef0bc4a3a7
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1061049
milestone35.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 1061049 - Fix some bad impliciti constructors in RDF; r=bsmedberg
rdf/base/nsCompositeDataSource.cpp
rdf/base/nsInMemoryDataSource.cpp
rdf/base/nsNameSpaceMap.h
rdf/base/nsRDFService.cpp
rdf/base/nsRDFXMLSerializer.cpp
rdf/base/rdfTriplesSerializer.cpp
--- a/rdf/base/nsCompositeDataSource.cpp
+++ b/rdf/base/nsCompositeDataSource.cpp
@@ -58,17 +58,17 @@ class CompositeEnumeratorImpl;
 class CompositeArcsInOutEnumeratorImpl;
 class CompositeAssertionEnumeratorImpl;
 
 class CompositeDataSourceImpl : public nsIRDFCompositeDataSource,
                                 public nsIRDFObserver
 {
 public:
     CompositeDataSourceImpl(void);
-    CompositeDataSourceImpl(char** dataSources);
+    explicit CompositeDataSourceImpl(char** dataSources);
 
     // nsISupports interface
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(CompositeDataSourceImpl,
                                              nsIRDFCompositeDataSource)
 
     // nsIRDFDataSource interface
     NS_DECL_NSIRDFDATASOURCE
--- a/rdf/base/nsInMemoryDataSource.cpp
+++ b/rdf/base/nsInMemoryDataSource.cpp
@@ -82,17 +82,17 @@ public:
     static PLDHashOperator
     DeletePropertyHashEntry(PLDHashTable* aTable, PLDHashEntryHdr* aHdr,
                            uint32_t aNumber, void* aArg);
 
     Assertion(nsIRDFResource* aSource,      // normal assertion
               nsIRDFResource* aProperty,
               nsIRDFNode* aTarget,
               bool aTruthValue);
-    Assertion(nsIRDFResource* aSource);     // PLDHashTable assertion variant
+    explicit Assertion(nsIRDFResource* aSource);     // PLDHashTable assertion variant
 
 private:
     ~Assertion();
 
 public:
     void AddRef() {
         if (mRefCnt == UINT16_MAX) {
             NS_WARNING("refcount overflow, leaking Assertion");
@@ -280,17 +280,17 @@ protected:
                  nsIRDFNode* target,
                  bool tv);
 
     nsresult
     LockedUnassert(nsIRDFResource* source,
                    nsIRDFResource* property,
                    nsIRDFNode* target);
 
-    InMemoryDataSource(nsISupports* aOuter);
+    explicit InMemoryDataSource(nsISupports* aOuter);
     virtual ~InMemoryDataSource();
     nsresult Init();
 
     friend nsresult
     NS_NewRDFInMemoryDataSource(nsISupports* aOuter, const nsIID& aIID, void** aResult);
 
 public:
     NS_DECL_CYCLE_COLLECTING_AGGREGATED
@@ -1993,17 +1993,17 @@ InMemoryDataSource::SweepForwardArcsEntr
 }
 
 ////////////////////////////////////////////////////////////////////////
 // rdfIDataSource methods
 
 class VisitorClosure
 {
 public:
-    VisitorClosure(rdfITripleVisitor* aVisitor) :
+    explicit VisitorClosure(rdfITripleVisitor* aVisitor) :
         mVisitor(aVisitor),
         mRv(NS_OK)
     {}
     rdfITripleVisitor* mVisitor;
     nsresult mRv;
 };
 
 PLDHashOperator
--- a/rdf/base/nsNameSpaceMap.h
+++ b/rdf/base/nsNameSpaceMap.h
@@ -36,17 +36,17 @@ public:
 
     nsresult
     Put(const nsCSubstring& aURI, nsIAtom* aPrefix);
 
     class const_iterator {
     protected:
         friend class nsNameSpaceMap;
 
-        const_iterator(const Entry* aCurrent)
+        explicit const_iterator(const Entry* aCurrent)
             : mCurrent(aCurrent) {}
 
         const Entry* mCurrent;
 
     public:
         const_iterator()
             : mCurrent(nullptr) {}
 
--- a/rdf/base/nsRDFService.cpp
+++ b/rdf/base/nsRDFService.cpp
@@ -403,17 +403,17 @@ public:
 
     // nsIRDFNode
     NS_DECL_NSIRDFNODE
 
     // nsIRDFLiteral
     NS_DECL_NSIRDFLITERAL
 
 protected:
-    LiteralImpl(const char16_t* s);
+    explicit LiteralImpl(const char16_t* s);
     virtual ~LiteralImpl();
 
     const char16_t* GetValue() const {
         size_t objectSize = ((sizeof(LiteralImpl) + sizeof(char16_t) - 1) / sizeof(char16_t)) * sizeof(char16_t);
         return reinterpret_cast<const char16_t*>(reinterpret_cast<const unsigned char*>(this) + objectSize);
     }
 };
 
@@ -516,17 +516,17 @@ LiteralImpl::GetValueConst(const char16_
 }
 
 ////////////////////////////////////////////////////////////////////////
 // DateImpl
 //
 
 class DateImpl : public nsIRDFDate {
 public:
-    DateImpl(const PRTime s);
+    explicit DateImpl(const PRTime s);
 
     // nsISupports
     NS_DECL_ISUPPORTS
 
     // nsIRDFNode
     NS_DECL_NSIRDFNODE
 
     // nsIRDFDate
@@ -623,17 +623,17 @@ DateImpl::EqualsDate(nsIRDFDate* date, b
 }
 
 ////////////////////////////////////////////////////////////////////////
 // IntImpl
 //
 
 class IntImpl : public nsIRDFInt {
 public:
-    IntImpl(int32_t s);
+    explicit IntImpl(int32_t s);
 
     // nsISupports
     NS_DECL_ISUPPORTS
 
     // nsIRDFNode
     NS_DECL_NSIRDFNODE
 
     // nsIRDFInt
--- a/rdf/base/nsRDFXMLSerializer.cpp
+++ b/rdf/base/nsRDFXMLSerializer.cpp
@@ -1005,17 +1005,17 @@ nsRDFXMLSerializer::SerializeEpilogue(ns
 {
     return rdf_BlockingWrite(aStream, NS_LITERAL_CSTRING("</RDF:RDF>\n"));
 }
 
 class QNameCollector MOZ_FINAL : public rdfITripleVisitor {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_RDFITRIPLEVISITOR
-    QNameCollector(nsRDFXMLSerializer* aParent)
+    explicit QNameCollector(nsRDFXMLSerializer* aParent)
         : mParent(aParent){}
 private:
     ~QNameCollector() {}
     nsRDFXMLSerializer* mParent;
 };
 
 NS_IMPL_ISUPPORTS(QNameCollector, rdfITripleVisitor)
 nsresult
--- a/rdf/base/rdfTriplesSerializer.cpp
+++ b/rdf/base/rdfTriplesSerializer.cpp
@@ -19,17 +19,17 @@
 
 #include "nsIRDFResource.h"
 #include "nsIRDFLiteral.h"
 #include "mozilla/Attributes.h"
 
 class TriplesVisitor MOZ_FINAL : public rdfITripleVisitor
 {
 public:
-    TriplesVisitor(nsIOutputStream* aOut) : mOut(aOut) {}
+    explicit TriplesVisitor(nsIOutputStream* aOut) : mOut(aOut) {}
     NS_DECL_RDFITRIPLEVISITOR
     NS_DECL_ISUPPORTS
 protected:
     ~TriplesVisitor() {}
     nsresult writeResource(nsIRDFResource* aResource);
     nsIOutputStream* mOut;
 };