Skip to content

Commit

Permalink
Bug 1048239 - Fix more bad implicit constructors in XPCOM; r=froydnj
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan committed Aug 5, 2014
1 parent c885140 commit 4af9c14
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion intl/unicharutil/nsSaveAsCharset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ nsresult nsSaveAsCharset::SetupCharsetList(const char *charsetList)
mCharsetListIndex = -1;
}

nsCWhitespaceTokenizer tokenizer = nsDependentCString(charsetList);
nsCWhitespaceTokenizer tokenizer((nsDependentCString(charsetList)));
while (tokenizer.hasMoreTokens()) {
ParseString(tokenizer.nextToken(), ',', mCharsetList);
}
Expand Down
4 changes: 2 additions & 2 deletions xpcom/base/nsMemoryInfoDumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class nsDumpGCAndCCLogsCallbackHolder MOZ_FINAL : public nsIDumpGCAndCCLogsCallb
public:
NS_DECL_ISUPPORTS

nsDumpGCAndCCLogsCallbackHolder(nsIDumpGCAndCCLogsCallback* aCallback)
explicit nsDumpGCAndCCLogsCallbackHolder(nsIDumpGCAndCCLogsCallback* aCallback)
: mCallback(aCallback)
{
}
Expand Down Expand Up @@ -430,7 +430,7 @@ class DumpReportCallback MOZ_FINAL : public nsIHandleReportCallback
public:
NS_DECL_ISUPPORTS

DumpReportCallback(nsGZFileWriter* aWriter)
explicit DumpReportCallback(nsGZFileWriter* aWriter)
: mIsFirst(true)
, mWriter(aWriter)
{
Expand Down
2 changes: 1 addition & 1 deletion xpcom/base/nsMemoryReporterManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1861,7 +1861,7 @@ namespace {
class MinimizeMemoryUsageRunnable : public nsRunnable
{
public:
MinimizeMemoryUsageRunnable(nsIRunnable* aCallback)
explicit MinimizeMemoryUsageRunnable(nsIRunnable* aCallback)
: mCallback(aCallback)
, mRemainingIters(sNumIters)
{
Expand Down
2 changes: 1 addition & 1 deletion xpcom/base/nsMessageLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class MessageLoopTimerCallback
: public nsITimerCallback
{
public:
MessageLoopTimerCallback(MessageLoopIdleTask* aTask);
explicit MessageLoopTimerCallback(MessageLoopIdleTask* aTask);

NS_DECL_ISUPPORTS
NS_DECL_NSITIMERCALLBACK
Expand Down
4 changes: 2 additions & 2 deletions xpcom/ds/nsExpirationTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class nsExpirationTracker
* period is zero, then we don't use a timer and rely on someone calling
* AgeOneGeneration explicitly.
*/
nsExpirationTracker(uint32_t aTimerPeriod)
explicit nsExpirationTracker(uint32_t aTimerPeriod)
: mTimerPeriod(aTimerPeriod)
, mNewestGeneration(0)
, mInAgeOneGeneration(false)
Expand Down Expand Up @@ -238,7 +238,7 @@ class nsExpirationTracker
uint32_t mGeneration;
uint32_t mIndex;
public:
Iterator(nsExpirationTracker<T, K>* aTracker)
explicit Iterator(nsExpirationTracker<T, K>* aTracker)
: mTracker(aTracker)
, mGeneration(0)
, mIndex(0)
Expand Down
6 changes: 3 additions & 3 deletions xpcom/ds/nsWhitespaceTokenizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class nsTWhitespaceTokenizer
typedef typename DependentSubstringType::substring_type SubstringType;

public:
nsTWhitespaceTokenizer(const SubstringType& aSource)
explicit nsTWhitespaceTokenizer(const SubstringType& aSource)
: mIter(aSource.Data(), aSource.Length()),
mEnd(aSource.Data() + aSource.Length(), aSource.Data(),
aSource.Length()),
Expand Down Expand Up @@ -85,7 +85,7 @@ class nsWhitespaceTokenizerTemplate
: public nsTWhitespaceTokenizer<nsDependentSubstring, IsWhitespace>
{
public:
nsWhitespaceTokenizerTemplate(const nsSubstring& aSource)
explicit nsWhitespaceTokenizerTemplate(const nsSubstring& aSource)
: nsTWhitespaceTokenizer<nsDependentSubstring, IsWhitespace>(aSource)
{
}
Expand All @@ -98,7 +98,7 @@ class nsCWhitespaceTokenizerTemplate
: public nsTWhitespaceTokenizer<nsDependentCSubstring, IsWhitespace>
{
public:
nsCWhitespaceTokenizerTemplate(const nsCSubstring& aSource)
explicit nsCWhitespaceTokenizerTemplate(const nsCSubstring& aSource)
: nsTWhitespaceTokenizer<nsDependentCSubstring, IsWhitespace>(aSource)
{
}
Expand Down

0 comments on commit 4af9c14

Please sign in to comment.