diff --git a/editor/txtsvc/src/nsTextServicesDocument.cpp b/editor/txtsvc/src/nsTextServicesDocument.cpp index 1f08e82380f..b7d41769389 100644 --- a/editor/txtsvc/src/nsTextServicesDocument.cpp +++ b/editor/txtsvc/src/nsTextServicesDocument.cpp @@ -80,8 +80,6 @@ public: nsTextServicesDocument::nsTextServicesDocument() { - mRefCnt = 0; - mSelStartIndex = -1; mSelStartOffset = -1; mSelEndIndex = -1; diff --git a/xpcom/glue/nsISupportsImpl.h b/xpcom/glue/nsISupportsImpl.h index a773065f428..6cc2a513246 100644 --- a/xpcom/glue/nsISupportsImpl.h +++ b/xpcom/glue/nsISupportsImpl.h @@ -138,7 +138,7 @@ public: : mRefCntAndFlags(0) {} - nsCycleCollectingAutoRefCnt(uintptr_t aValue) + explicit nsCycleCollectingAutoRefCnt(uintptr_t aValue) : mRefCntAndFlags(aValue << NS_NUMBER_OF_FLAGS_IN_REFCNT) { } @@ -233,7 +233,7 @@ class nsAutoRefCnt { public: nsAutoRefCnt() : mValue(0) {} - nsAutoRefCnt(nsrefcnt aValue) : mValue(aValue) {} + explicit nsAutoRefCnt(nsrefcnt aValue) : mValue(aValue) {} // only support prefix increment/decrement nsrefcnt operator++() { return ++mValue; } diff --git a/xpcom/glue/nsTArray.h b/xpcom/glue/nsTArray.h index 2bafb97ee46..6906f37a67c 100644 --- a/xpcom/glue/nsTArray.h +++ b/xpcom/glue/nsTArray.h @@ -102,7 +102,7 @@ class nsIntRegion; struct nsTArrayFallibleResult { // Note: allows implicit conversions from and to bool - nsTArrayFallibleResult(bool result) + MOZ_IMPLICIT nsTArrayFallibleResult(bool result) : mResult(result) {} diff --git a/xpcom/string/public/nsString.h b/xpcom/string/public/nsString.h index db5cc339c5d..c5e7fc927b7 100644 --- a/xpcom/string/public/nsString.h +++ b/xpcom/string/public/nsString.h @@ -83,7 +83,7 @@ public: private: // NOT TO BE IMPLEMENTED - NS_LossyConvertUTF16toASCII( char ); + NS_LossyConvertUTF16toASCII( char ) MOZ_DELETE; }; @@ -109,7 +109,7 @@ public: private: // NOT TO BE IMPLEMENTED - NS_ConvertASCIItoUTF16( char16_t ); + NS_ConvertASCIItoUTF16( char16_t ) MOZ_DELETE; }; @@ -145,7 +145,7 @@ public: private: // NOT TO BE IMPLEMENTED - NS_ConvertUTF16toUTF8( char ); + NS_ConvertUTF16toUTF8( char ) MOZ_DELETE; }; @@ -171,7 +171,7 @@ public: private: // NOT TO BE IMPLEMENTED - NS_ConvertUTF8toUTF16( char16_t ); + NS_ConvertUTF8toUTF16( char16_t ) MOZ_DELETE; }; diff --git a/xpcom/string/public/nsTDependentString.h b/xpcom/string/public/nsTDependentString.h index 9bd7ed9539b..a554a667d14 100644 --- a/xpcom/string/public/nsTDependentString.h +++ b/xpcom/string/public/nsTDependentString.h @@ -94,5 +94,5 @@ public: private: // NOT USED - nsTDependentString_CharT( const substring_tuple_type& ); + nsTDependentString_CharT( const substring_tuple_type& ) MOZ_DELETE; };