Bug 1061057 - Fix more bad implicit constructors in universalchardet; r=smontagu

This commit is contained in:
Ehsan Akhgari 2014-09-01 17:44:24 -04:00
parent 0ef07c7d0b
commit cfc6abd041
12 changed files with 13 additions and 13 deletions

View File

@ -12,7 +12,7 @@
class nsBig5Prober: public nsCharSetProber {
public:
nsBig5Prober(bool aIsPreferredLanguage)
explicit nsBig5Prober(bool aIsPreferredLanguage)
:mIsPreferredLanguage(aIsPreferredLanguage)
{mCodingSM = new nsCodingStateMachine(&Big5SMModel);
Reset();}

View File

@ -32,7 +32,7 @@ typedef struct
class nsCodingStateMachine {
public:
nsCodingStateMachine(const SMModel* sm) : mModel(sm) { mCurrentState = eStart; }
explicit nsCodingStateMachine(const SMModel* sm) : mModel(sm) { mCurrentState = eStart; }
nsSMState NextState(char c){
//for each byte we get its class , if it is first byte, we also get byte length
uint32_t byteCls = GETCLASS(c);

View File

@ -18,7 +18,7 @@
class nsEUCJPProber: public nsCharSetProber {
public:
nsEUCJPProber(bool aIsPreferredLanguage)
explicit nsEUCJPProber(bool aIsPreferredLanguage)
:mIsPreferredLanguage(aIsPreferredLanguage)
{mCodingSM = new nsCodingStateMachine(&EUCJPSMModel);
Reset();}

View File

@ -12,7 +12,7 @@
class nsEUCKRProber: public nsCharSetProber {
public:
nsEUCKRProber(bool aIsPreferredLanguage)
explicit nsEUCKRProber(bool aIsPreferredLanguage)
:mIsPreferredLanguage(aIsPreferredLanguage)
{mCodingSM = new nsCodingStateMachine(&EUCKRSMModel);
Reset();

View File

@ -12,7 +12,7 @@
class nsEUCTWProber: public nsCharSetProber {
public:
nsEUCTWProber(bool aIsPreferredLanguage)
explicit nsEUCTWProber(bool aIsPreferredLanguage)
:mIsPreferredLanguage(aIsPreferredLanguage)
{mCodingSM = new nsCodingStateMachine(&EUCTWSMModel);
Reset();}

View File

@ -13,7 +13,7 @@
class nsEscCharSetProber: public nsCharSetProber {
public:
nsEscCharSetProber(uint32_t aLanguageFilter);
explicit nsEscCharSetProber(uint32_t aLanguageFilter);
virtual ~nsEscCharSetProber(void);
nsProbingState HandleData(const char* aBuf, uint32_t aLen);
const char* GetCharSetName() {return mDetectedCharset;}

View File

@ -14,7 +14,7 @@
class nsGB18030Prober: public nsCharSetProber {
public:
nsGB18030Prober(bool aIsPreferredLanguage)
explicit nsGB18030Prober(bool aIsPreferredLanguage)
:mIsPreferredLanguage(aIsPreferredLanguage)
{mCodingSM = new nsCodingStateMachine(&GB18030SMModel);
Reset();}

View File

@ -18,7 +18,7 @@
class nsMBCSGroupProber: public nsCharSetProber {
public:
nsMBCSGroupProber(uint32_t aLanguageFilter);
explicit nsMBCSGroupProber(uint32_t aLanguageFilter);
virtual ~nsMBCSGroupProber();
nsProbingState HandleData(const char* aBuf, uint32_t aLen);
const char* GetCharSetName();

View File

@ -28,7 +28,7 @@ typedef struct
class nsSingleByteCharSetProber : public nsCharSetProber{
public:
nsSingleByteCharSetProber(const SequenceModel *model)
explicit nsSingleByteCharSetProber(const SequenceModel *model)
:mModel(model), mReversed(false), mNameProber(0) { Reset(); }
nsSingleByteCharSetProber(const SequenceModel *model, bool reversed, nsCharSetProber* nameProber)
:mModel(model), mReversed(reversed), mNameProber(nameProber) { Reset(); }

View File

@ -19,7 +19,7 @@
class nsSJISProber: public nsCharSetProber {
public:
nsSJISProber(bool aIsPreferredLanguage)
explicit nsSJISProber(bool aIsPreferredLanguage)
:mIsPreferredLanguage(aIsPreferredLanguage)
{mCodingSM = new nsCodingStateMachine(&SJISSMModel);
Reset();}

View File

@ -31,7 +31,7 @@ typedef enum {
class nsUniversalDetector {
public:
nsUniversalDetector(uint32_t aLanguageFilter);
explicit nsUniversalDetector(uint32_t aLanguageFilter);
virtual ~nsUniversalDetector();
virtual nsresult HandleData(const char* aBuf, uint32_t aLen);
virtual void DataEnd(void);

View File

@ -79,7 +79,7 @@ class nsXPCOMDetector :
{
NS_DECL_ISUPPORTS
public:
nsXPCOMDetector(uint32_t aLanguageFilter);
explicit nsXPCOMDetector(uint32_t aLanguageFilter);
NS_IMETHOD Init(nsICharsetDetectionObserver* aObserver);
NS_IMETHOD DoIt(const char* aBuf, uint32_t aLen, bool *oDontFeedMe);
NS_IMETHOD Done();
@ -98,7 +98,7 @@ class nsXPCOMStringDetector :
{
NS_DECL_ISUPPORTS
public:
nsXPCOMStringDetector(uint32_t aLanguageFilter);
explicit nsXPCOMStringDetector(uint32_t aLanguageFilter);
NS_IMETHOD DoIt(const char* aBuf, uint32_t aLen,
const char** oCharset, nsDetectionConfident &oConf);
protected: