Bug 1053605 - Fix the bad implicit constructors in intl/; r=smontagu

This commit is contained in:
Ehsan Akhgari 2014-08-18 09:53:43 -04:00
parent bb35753e96
commit bd13535bf2
6 changed files with 11 additions and 9 deletions

View File

@ -15,7 +15,7 @@ class nsIURI;
class nsHyphenator
{
public:
nsHyphenator(nsIURI *aURI);
explicit nsHyphenator(nsIURI *aURI);
NS_INLINE_DECL_REFCOUNTING(nsHyphenator)

View File

@ -131,7 +131,7 @@ public:
/**
* Class constructor.
*/
nsBufferDecoderSupport(uint32_t aMaxLengthFactor);
explicit nsBufferDecoderSupport(uint32_t aMaxLengthFactor);
/**
* Class destructor.
@ -242,7 +242,7 @@ public:
/**
* Class constructor.
*/
nsOneByteDecoderSupport(uMappingTable * aMappingTable);
explicit nsOneByteDecoderSupport(uMappingTable * aMappingTable);
/**
* Class destructor.
@ -353,7 +353,7 @@ public:
/**
* Class constructor.
*/
nsEncoderSupport(uint32_t aMaxLengthFactor);
explicit nsEncoderSupport(uint32_t aMaxLengthFactor);
/**
* Class destructor.

View File

@ -28,7 +28,7 @@ public:
/**
* Class constructor.
*/
nsUnicodeToGBK(uint32_t aMaxLengthFactor = 2);
explicit nsUnicodeToGBK(uint32_t aMaxLengthFactor = 2);
virtual ~nsUnicodeToGBK() {}
protected:

View File

@ -7,6 +7,7 @@
#define GreekCasing_h_
#include <stdint.h>
#include "mozilla/Attributes.h"
namespace mozilla {
@ -45,7 +46,7 @@ public:
{
}
State(const GreekStates& aState)
MOZ_IMPLICIT State(const GreekStates& aState)
: mState(aState)
{
}

View File

@ -241,7 +241,7 @@ IrishCasing::UpperCase(uint32_t aCh, State& aState,
uint8_t stateEntry = sUppercaseStateTable[cls][aState];
aMarkPos = !!(stateEntry & kMarkPositionFlag);
aAction = (stateEntry & kActionMask) >> kActionShift;
aState = (stateEntry & kNextStateMask);
aState = State(stateEntry & kNextStateMask);
return ToUpperCase(aCh);
}

View File

@ -7,6 +7,7 @@
#define IrishCasing_h_
#include <stdint.h>
#include "mozilla/Attributes.h"
namespace mozilla {
@ -62,7 +63,7 @@ public:
{
}
State(const IrishStates& aState)
MOZ_IMPLICIT State(const IrishStates& aState)
: mState(aState)
{
}
@ -78,7 +79,7 @@ public:
}
private:
State(uint8_t aState)
explicit State(uint8_t aState)
: mState(IrishStates(aState))
{
}