Address more cppcheck warnings, mostly around assignment operators & explicit constructors

This commit is contained in:
Brian Cox 2017-03-15 23:41:23 -07:00
parent b1147d65cf
commit 8bd86fe60d
36 changed files with 88 additions and 71 deletions

1
.gitignore vendored
View File

@ -12,6 +12,7 @@ src/tripwire/tripwire
src/twadmin/twadmin
src/twprint/twprint
src/twtest/twtest
src/test-harness/twtest
**/Makefile
**/*.o
**/*.dylib

View File

@ -751,7 +751,7 @@ bool cHierDatabaseIter::CompareForUpperBound( const cHierEntry& he, const TCHAR*
class cHierDatabaseIterCallCompare
{
public:
cHierDatabaseIterCallCompare( const cHierDatabaseIter* pcls )
explicit cHierDatabaseIterCallCompare( const cHierDatabaseIter* pcls )
: pc( pcls ) {};
bool operator()( const cHierEntry& a1, const TCHAR* a2 )

View File

@ -114,7 +114,7 @@ private:
class cHierDatabaseIter
{
public:
cHierDatabaseIter( cHierDatabase* pDb ); //throw (eArchive)
explicit cHierDatabaseIter( cHierDatabase* pDb ); //throw (eArchive)
~cHierDatabaseIter();
//

View File

@ -68,7 +68,7 @@ public:
};
cHierNode( Type type = TYPE_INVALID ) : mType( type ) {}
explicit cHierNode( Type type = TYPE_INVALID ) : mType( type ) {}
virtual ~cHierNode() {}
int32 mType;

View File

@ -53,7 +53,7 @@ public:
};
cFCOCompare();
cFCOCompare( const cFCOPropVector& propsToCompare);
explicit cFCOCompare( const cFCOPropVector& propsToCompare);
virtual ~cFCOCompare();
void SetPropsToCmp(const cFCOPropVector& pv);

View File

@ -440,7 +440,7 @@ bool cFCODataSourceIterImpl::CompareForUpperBound( const iFCO* pFCO, const TCHAR
class cFCODataSourceIterImplCallCompare
{
public:
cFCODataSourceIterImplCallCompare( const cFCODataSourceIterImpl* pcls )
explicit cFCODataSourceIterImplCallCompare( const cFCODataSourceIterImpl* pcls )
: pc( pcls ) {};
bool operator()( const iFCO* a1, const TCHAR* a2 )

View File

@ -177,7 +177,7 @@ void cFCOName::SetNameInfo(iFCONameInfo* pNI)
///////////////////////////////////////////////////////////////////////////////
// operator=
///////////////////////////////////////////////////////////////////////////////
void cFCOName::operator = (const cFCOName& rhs)
cFCOName& cFCOName::operator = (const cFCOName& rhs)
{
mpPathName->Release();
// TODO -- I am sure this won't work (const-ness)
@ -188,16 +188,19 @@ void cFCOName::operator = (const cFCOName& rhs)
#ifdef _DEBUG
mDebugStrName = AsString();
#endif
return *this;
}
void cFCOName::operator = (const TSTRING& rhs)
cFCOName& cFCOName::operator = (const TSTRING& rhs)
{
*this = rhs.c_str();
#ifdef _DEBUG
mDebugStrName = AsString();
#endif
return *this;
}
void cFCOName::operator = (const TCHAR* rhs)
cFCOName& cFCOName::operator = (const TCHAR* rhs)
{
// if I have the only handle on this vector, I can reuse it
// otherwise, I have to release it.
@ -210,6 +213,7 @@ void cFCOName::operator = (const TCHAR* rhs)
#ifdef _DEBUG
mDebugStrName = AsString();
#endif
return *this;
}
void cFCOName::ParseString( const TCHAR* pszin )

View File

@ -58,7 +58,7 @@ class cFCOName : public iTypedSerializable
public:
typedef cFCONameIter iterator;
cFCOName(iFCONameInfo* iNI = NULL);
explicit cFCOName(iFCONameInfo* iNI = NULL);
cFCOName(const cFCOName& rhs);
explicit cFCOName(const TSTRING& rhs, iFCONameInfo* iNI = NULL);
@ -67,9 +67,9 @@ public:
// do it unexpectedly
virtual ~cFCOName();
void operator = (const cFCOName& rhs);
void operator = (const TSTRING& rhs);
void operator = (const TCHAR* rhs);
cFCOName& operator = (const cFCOName& rhs);
cFCOName& operator = (const TSTRING& rhs);
cFCOName& operator = (const TCHAR* rhs);
bool operator < (const cFCOName& rhs) const;
// defines an arbitrary order for cFCONames. This is so that names can
@ -165,7 +165,7 @@ class cFCONameIter_i;
class cFCONameIter
{
public:
cFCONameIter(const cFCOName& name);
explicit cFCONameIter(const cFCOName& name);
~cFCONameIter();
int GetSize() const; // returns the number of entries in the fco name

View File

@ -110,7 +110,7 @@ private:
class cFCONameTbl
{
public:
cFCONameTbl(int defSize = HASH_VERY_LARGE);
explicit cFCONameTbl(int defSize = HASH_VERY_LARGE);
// defSize is the initial hash table size
~cFCONameTbl();

View File

@ -394,7 +394,6 @@ void cFCOPropVector::Read(iSerializer* pSerializer, int32 version)
if (version > 0)
ThrowAndAssert(eSerializerVersionMismatch(_T("Property Vector Read")));
int i;
int32 newSize;
pSerializer->ReadInt32(newSize);
ASSERT(newSize > 0);
@ -409,7 +408,7 @@ void cFCOPropVector::Read(iSerializer* pSerializer, int32 version)
}
else
{
for (i=0; i <= mSize / msBitlength; ++i)
for (int i=0; i <= mSize / msBitlength; ++i)
{
int32 mask;
pSerializer->ReadInt32(mask);
@ -421,7 +420,6 @@ void cFCOPropVector::Read(iSerializer* pSerializer, int32 version)
void cFCOPropVector::Write(iSerializer* pSerializer) const
{
int i;
pSerializer->WriteInt32(mSize);
if (mpBuf == NULL)
@ -430,7 +428,7 @@ void cFCOPropVector::Write(iSerializer* pSerializer) const
}
else
{
for (i=0; i <= mSize / msBitlength; ++i)
for (int i=0; i <= mSize / msBitlength; ++i)
pSerializer->WriteInt32((*mpBuf)[i]);
}

View File

@ -49,7 +49,7 @@
class cFCOPropVector : public iSerializable // note: this is not iTypedSerializable
{
public:
cFCOPropVector (int size = 32);
explicit cFCOPropVector (int size = 32);
cFCOPropVector (const cFCOPropVector& rhs);
virtual ~cFCOPropVector (void);
bool operator== (const cFCOPropVector& rhs) const;

View File

@ -80,7 +80,7 @@ cFCOSetImpl::cFCOSetImpl(const cFCOSetImpl& rhs) : iFCOSet()
///////////////////////////////////////////////////////////////////////////////
// operator=
///////////////////////////////////////////////////////////////////////////////
void cFCOSetImpl::operator=(const cFCOSetImpl& rhs)
cFCOSetImpl& cFCOSetImpl::operator=(const cFCOSetImpl& rhs)
{
std::set<cFCONode>::const_iterator i;
for(i = rhs.mFCOSet.begin(); i != rhs.mFCOSet.end(); ++i)
@ -88,6 +88,8 @@ void cFCOSetImpl::operator=(const cFCOSetImpl& rhs)
i->mpFCO->AddRef();
mFCOSet.insert(cFCONode(i->mpFCO));
}
return *this;
}
///////////////////////////////////////////////////////////////////////////////

View File

@ -56,7 +56,7 @@ public:
cFCOSetImpl();
cFCOSetImpl(const cFCOSetImpl& rhs);
virtual ~cFCOSetImpl();
void operator=(const cFCOSetImpl& rhs);
cFCOSetImpl& operator=(const cFCOSetImpl& rhs);
virtual const iFCOIter* Lookup(const cFCOName& name) const;
virtual iFCOIter* Lookup(const cFCOName& name);
@ -85,8 +85,9 @@ private:
const cFCOName* mpFCOName;
cFCONode() : mpFCO(0), mpFCOName(0) {}
cFCONode(iFCO* pFCO) : mpFCO(pFCO), mpFCOName(&pFCO->GetName()) {}
cFCONode(const cFCOName& name) : mpFCO(0), mpFCOName(&name) {}
//TODO: make the iFCO* constructor explicit
cFCONode(iFCO* pFCO) : mpFCO(pFCO), mpFCOName(&pFCO->GetName()) {}
explicit cFCONode(const cFCOName& name) : mpFCO(0), mpFCOName(&name) {}
cFCONode(const cFCONode& rhs) : mpFCO(rhs.mpFCO), mpFCOName(rhs.mpFCOName) {}
bool operator < (const cFCONode& rhs) const { if(mpFCOName) return (*mpFCOName < *rhs.mpFCOName); else return false; }
bool operator ==(const cFCONode& rhs) const { if(mpFCOName) return (*mpFCOName == *rhs.mpFCOName); else return false; }
@ -101,8 +102,8 @@ class cFCOIterImpl : public iFCOIter
friend class cFCOSetImpl;
public:
cFCOIterImpl(cFCOSetImpl* pSet);
cFCOIterImpl(const cFCOSetImpl* pSet);
explicit cFCOIterImpl(cFCOSetImpl* pSet);
explicit cFCOIterImpl(const cFCOSetImpl* pSet);
virtual void SeekBegin() const;
virtual bool Done() const;

View File

@ -94,7 +94,7 @@ private:
class cFCOSpecAttrEmailIter
{
public:
cFCOSpecAttrEmailIter(const cFCOSpecAttr& attr);
explicit cFCOSpecAttrEmailIter(const cFCOSpecAttr& attr);
~cFCOSpecAttrEmailIter();
void SeekBegin() const;

View File

@ -159,7 +159,7 @@ protected:
class cFCOSpecStopPointIter
{
public:
cFCOSpecStopPointIter(cFCOSpecStopPointSet& set);
explicit cFCOSpecStopPointIter(cFCOSpecStopPointSet& set);
void SeekBegin() const;
// seeks to the beginning of the stop point list

View File

@ -100,11 +100,13 @@ IMPLEMENT_SERREFCOUNT(cFCOSpecImpl, _T("cFCOSpecImpl"), 0, 1);
///////////////////////////////////////////////////////////////////////////////
// operator=
///////////////////////////////////////////////////////////////////////////////
void cFCOSpecImpl::operator=(const cFCOSpecImpl& rhs)
cFCOSpecImpl& cFCOSpecImpl::operator=(const cFCOSpecImpl& rhs)
{
mName = rhs.mName;
mPropVector = rhs.mPropVector;
mpHelper = rhs.mpHelper ? rhs.mpHelper->Clone() : 0;
return *this;
}
///////////////////////////////////////////////////////////////////////////////
// Clone -- make a copy of this spec

View File

@ -70,7 +70,7 @@ public:
// the spec will delete whatever helper it contains when it is destroyed
cFCOSpecImpl(const cFCOSpecImpl& rhs);
cFCOSpecImpl();
void operator=(const cFCOSpecImpl& rhs);
cFCOSpecImpl& operator=(const cFCOSpecImpl& rhs);
// from iFCOSpec
virtual bool SpecContainsFCO (const cFCOName& name) const;

View File

@ -103,7 +103,7 @@ protected:
class cFCOSpecListAddedIter
{
public:
cFCOSpecListAddedIter(const cFCOSpecList& list);
explicit cFCOSpecListAddedIter(const cFCOSpecList& list);
~cFCOSpecListAddedIter();
void SeekBegin() const;
@ -129,7 +129,7 @@ protected:
class cFCOSpecListCanonicalIter
{
public:
cFCOSpecListCanonicalIter(const cFCOSpecList& list);
explicit cFCOSpecListCanonicalIter(const cFCOSpecList& list);
~cFCOSpecListCanonicalIter();
void SeekBegin() const;

View File

@ -50,6 +50,7 @@ template<class TYPE>
class cIterProxy
{
public:
//TODO: Can these 2 constructors be made explicit?
cIterProxy(TYPE* pIter = NULL) : mpIter(pIter) {};
cIterProxy(const TYPE* pIter) : mpIter((TYPE*)pIter) {};
~cIterProxy() { if (mpIter) mpIter->DestroyIter(); }

View File

@ -60,7 +60,7 @@ class cFSObject : public iFCO
DECLARE_SERREFCOUNT()
public:
cFSObject(const cFCOName& name);
explicit cFSObject(const cFCOName& name);
virtual void SetName(const cFCOName& name) ;
virtual const cFCOName& GetName() const ;

View File

@ -255,7 +255,7 @@ private:
class cPipedMailMessage : public cMailMessage
{
public:
cPipedMailMessage(TSTRING strSendMailExePath);
explicit cPipedMailMessage(const TSTRING& strSendMailExePath);
virtual ~cPipedMailMessage();
virtual bool Send(); //throw(eMailMessageError)

View File

@ -49,7 +49,7 @@
//
// Constructor. Not much to do beside initialize the handle to the DLL
//
cPipedMailMessage::cPipedMailMessage(TSTRING strSendMailExePath)
cPipedMailMessage::cPipedMailMessage(const TSTRING& strSendMailExePath)
{
mstrSendMailExePath = strSendMailExePath;
mpFile = NULL;

View File

@ -140,7 +140,7 @@ private:
class cConfigFileIter
{
public:
cConfigFileIter( cConfigFile& cf);
explicit cConfigFileIter( cConfigFile& cf);
virtual ~cConfigFileIter();
void SeekBegin() const;

View File

@ -98,7 +98,7 @@ public:
// Ctor, Dtor:
~cDebugHierDbIter () {}
cDebugHierDbIter ( cHierDatabase* pDb ) : cHierDatabaseIter( pDb ) {}
explicit cDebugHierDbIter ( cHierDatabase* pDb ) : cHierDatabaseIter( pDb ) {}
//
// Methods for obtaining protected members of cHierDatabaseIter:

View File

@ -112,7 +112,7 @@ public:
//-------------------------------------------------------------------------
struct tEntry
{
tEntry( cGenre::Genre genre );
explicit tEntry( cGenre::Genre genre );
// the ctor will get the appropriate database construction parameters
// based on the genre number.
~tEntry( )
@ -146,7 +146,7 @@ private:
class cFCODatabaseFileIter
{
public:
cFCODatabaseFileIter( cFCODatabaseFile& dbFile );
explicit cFCODatabaseFileIter( cFCODatabaseFile& dbFile );
void SeekBegin();
void Next();

View File

@ -239,10 +239,12 @@ cFCOReportGenreIter::~cFCOReportGenreIter()
delete mpData;
}
void cFCOReportGenreIter::operator=(const cFCOReportGenreIter& rhs)
cFCOReportGenreIter& cFCOReportGenreIter::operator=(const cFCOReportGenreIter& rhs)
{
mpData->mpList = rhs.mpData->mpList;
mpData->mIter = rhs.mpData->mIter;
return *this;
}
// iteration methods
@ -380,13 +382,15 @@ cFCOReportSpecIter::cFCOReportSpecIter(const cFCOReportSpecIter& rhs)
*this = rhs;
}
void cFCOReportSpecIter::operator=(const cFCOReportSpecIter& rhs)
cFCOReportSpecIter& cFCOReportSpecIter::operator=(const cFCOReportSpecIter& rhs)
{
if (mpData == 0)
mpData = new cFCOReportSpecIter_i();
mpData->mpList = rhs.mpData->mpList;
mpData->mIter = rhs.mpData->mIter;
return *this;
}
int cFCOReportSpecIter::GetNumChanged() const
@ -525,10 +529,12 @@ cFCOReportChangeIter::~cFCOReportChangeIter()
delete mpData;
}
void cFCOReportChangeIter::operator=(const cFCOReportChangeIter& rhs)
cFCOReportChangeIter& cFCOReportChangeIter::operator=(const cFCOReportChangeIter& rhs)
{
mpData->mpList = rhs.mpData->mpList;
mpData->mIter = rhs.mpData->mIter;
return *this;
}
void cFCOReportChangeIter::SetSpecIter(const cFCOReportSpecIter& specIter)

View File

@ -147,7 +147,7 @@ public:
cFCOReportGenreIter(const cFCOReportGenreIter& rhs);
~cFCOReportGenreIter();
void operator=(const cFCOReportGenreIter& rhs);
cFCOReportGenreIter& operator=(const cFCOReportGenreIter& rhs);
// iteration methods
void SeekBegin() const;
@ -179,13 +179,13 @@ public:
cFCOReportSpecIter(cFCOReport& report, cGenre::Genre genre);
// if genre does not exist in the report, it will be added to the report with
// and empty spec list.
cFCOReportSpecIter(const cFCOReportGenreIter& genreIter);
explicit cFCOReportSpecIter(const cFCOReportGenreIter& genreIter);
// thorws eInternal if genreIter is not at a valid genre or is Done()
cFCOReportSpecIter(const cFCOReportSpecIter& rhs);
~cFCOReportSpecIter();
void operator=(const cFCOReportSpecIter& rhs);
cFCOReportSpecIter& operator=(const cFCOReportSpecIter& rhs);
// iteration methods
void SeekBegin() const;
@ -226,11 +226,11 @@ private:
class cFCOReportChangeIter
{
public:
cFCOReportChangeIter(const cFCOReportSpecIter& specIter);
explicit cFCOReportChangeIter(const cFCOReportSpecIter& specIter);
cFCOReportChangeIter(const cFCOReportChangeIter& rhs);
~cFCOReportChangeIter();
void operator=(const cFCOReportChangeIter& rhs);
cFCOReportChangeIter& operator=(const cFCOReportChangeIter& rhs);
void SetSpecIter(const cFCOReportSpecIter& specIter);
// assocaite this iterator with a different spec. We will assert
// that specIter.Done() is not true.

View File

@ -91,7 +91,7 @@ TSS_FILE_EXCEPTION( eFileManipUnrecognizedFileType, eFileManip )
class cFileManipulator
{
public:
cFileManipulator(const TCHAR* filename);
explicit cFileManipulator(const TCHAR* filename);
// throws eArchive if file does not exist
cFileManipulator(const cFileManipulator& rhs);
~cFileManipulator();

View File

@ -155,7 +155,7 @@ protected:
RuleSummaryLine() : mSeverity(0), mAddedObjects(0), mRemovedObjects(0), mChangedObjects(0) {}
RuleSummaryLine(const RuleSummaryLine& rhs) { *this = rhs; }
void operator = (const RuleSummaryLine& rhs)
RuleSummaryLine& operator = (const RuleSummaryLine& rhs)
{
mSpecName = rhs.mSpecName;
mSeverity = rhs.mSeverity;
@ -163,6 +163,8 @@ protected:
mRemovedObjects = rhs.mRemovedObjects;
mChangedObjects = rhs.mChangedObjects;
mStartPoint = rhs.mStartPoint;
return *this;
}
};

View File

@ -855,7 +855,7 @@ void cTWUtil::ReadConfigText(cArchive &arch, TSTRING& configText, cArchive* pBag
// of the policy file text to disk.
// Will throw eError on failure.
void cTWUtil::WritePolicyText(const TCHAR* filename, const std::string polText, bool bEncrypt, const cElGamalSigPrivateKey* pPrivateKey)
void cTWUtil::WritePolicyText(const TCHAR* filename, const std::string& polText, bool bEncrypt, const cElGamalSigPrivateKey* pPrivateKey)
{
cSerializableNString nstring;
@ -874,7 +874,7 @@ void cTWUtil::WritePolicyText(const TCHAR* filename, const std::string polText,
cDisplayEncoder::EncodeInline( filename ).c_str() );
}
void cTWUtil::WritePolicyText(cArchive &archive, const std::string polText, bool bEncrypt, const cElGamalSigPrivateKey* pPrivateKey)
void cTWUtil::WritePolicyText(cArchive &archive, const std::string& polText, bool bEncrypt, const cElGamalSigPrivateKey* pPrivateKey)
{
cSerializableNString nstring;

View File

@ -122,8 +122,8 @@ public:
// eSerializer is thrown if reading or writing fails
// eConfigFile is thrown if config file does not parse correctly during reading
static void WritePolicyText(const TCHAR* filename, const std::string policyText, bool bEncrypt, const cElGamalSigPrivateKey* pPrivateKey);
static void WritePolicyText(cArchive &archive, const std::string policyText, bool bEncrypt, const cElGamalSigPrivateKey* pPrivateKey);
static void WritePolicyText(const TCHAR* filename, const std::string& policyText, bool bEncrypt, const cElGamalSigPrivateKey* pPrivateKey);
static void WritePolicyText(cArchive &archive, const std::string& policyText, bool bEncrypt, const cElGamalSigPrivateKey* pPrivateKey);
static void ReadPolicyText(const TCHAR* filename, std::string& policyText, const cElGamalSigPublicKey* pPublicKey);
static void ReadPolicyText(cArchive &archive, std::string& policyText, const cElGamalSigPublicKey* pPublicKey);
// read and write policy file to and from disk

View File

@ -46,7 +46,7 @@
class cByteQueueNode
{
public:
cByteQueueNode(unsigned int maxSize);
explicit cByteQueueNode(unsigned int maxSize);
unsigned int CurrentSize() const
{return tail-head;}

View File

@ -45,7 +45,7 @@ class cByteQueueNode;
class cByteQueue : public BufferedTransformation
{
public:
cByteQueue(int nodeSize=1024);
explicit cByteQueue(int nodeSize=1024);
cByteQueue(const cByteQueue &copy);
~cByteQueue();

View File

@ -147,9 +147,9 @@ public:
KEY2048 = 2048
};
cRSA(KeySize keysize);
cRSA(const cRSAPublicKey& publicKey); // read keysize from key
cRSA(const cRSAPrivateKey& privateKey); // ditto
explicit cRSA(KeySize keysize);
explicit cRSA(const cRSAPublicKey& publicKey); // read keysize from key
explicit cRSA(const cRSAPrivateKey& privateKey); // ditto
virtual ~cRSA();
void SetEncrypting(const cRSAPublicKey* pKey);
@ -183,7 +183,7 @@ class cRSAPrivateKey
friend class cRSA;
friend class cRSAPublicKey;
public:
cRSAPrivateKey(void* pDataStream);
explicit cRSAPrivateKey(void* pDataStream);
~cRSAPrivateKey();
int GetWriteLen() const;
@ -202,8 +202,8 @@ class cRSAPublicKey
{
friend class cRSA;
public:
cRSAPublicKey(void* pDataStream);
cRSAPublicKey(const cRSAPrivateKey& privateKey);
explicit cRSAPublicKey(void* pDataStream);
explicit cRSAPublicKey(const cRSAPrivateKey& privateKey);
~cRSAPublicKey();
int GetWriteLen() const;
@ -249,9 +249,9 @@ public:
KEY2048 = 2048
};
cElGamalSig(KeySize keysize);
cElGamalSig(const cElGamalSigPublicKey& publicKey); // read keysize from key
cElGamalSig(const cElGamalSigPrivateKey& privateKey); // ditto
explicit cElGamalSig(KeySize keysize);
explicit cElGamalSig(const cElGamalSigPublicKey& publicKey); // read keysize from key
explicit cElGamalSig(const cElGamalSigPrivateKey& privateKey); // ditto
virtual ~cElGamalSig();
void SetSigning(const cElGamalSigPrivateKey* pKey);
@ -285,7 +285,7 @@ class cElGamalSigPrivateKey
friend class cElGamalSig;
friend class cElGamalSigPublicKey;
public:
cElGamalSigPrivateKey(void* pDataStream);
explicit cElGamalSigPrivateKey(void* pDataStream);
~cElGamalSigPrivateKey();
int GetWriteLen() const;
@ -304,8 +304,8 @@ class cElGamalSigPublicKey
{
friend class cElGamalSig;
public:
cElGamalSigPublicKey(void* pDataStream);
cElGamalSigPublicKey(const cElGamalSigPrivateKey& privateKey);
explicit cElGamalSigPublicKey(void* pDataStream);
explicit cElGamalSigPublicKey(const cElGamalSigPrivateKey& privateKey);
~cElGamalSigPublicKey();
int GetWriteLen() const;
@ -332,7 +332,7 @@ private:
class cHashedKey128
{
public:
cHashedKey128(const TSTRING& data);
explicit cHashedKey128(const TSTRING& data);
cHashedKey128(void* pData, int dataLen);
~cHashedKey128();
@ -368,7 +368,7 @@ inline void cHashedKey128::Write(void* pDataStream)
class cHashedKey192
{
public:
cHashedKey192(const TSTRING& data);
explicit cHashedKey192(const TSTRING& data);
cHashedKey192(void* pData, int dataLen);
~cHashedKey192();

View File

@ -238,7 +238,7 @@ public:
//
// ctors and dtor
//
cParseRule( const cParseSpecMask& defSpecMask ) :mDefSpecMask( defSpecMask ), mpAttrList(0), mpSpecMaskList(0), mName(_T("")) {}
explicit cParseRule( const cParseSpecMask& defSpecMask ) :mDefSpecMask( defSpecMask ), mpAttrList(0), mpSpecMaskList(0), mName(_T("")) {}
~cParseRule();
//

View File

@ -76,7 +76,7 @@ class tw_yy_scan : public yy_scan
{
enum { MAX_TOKEN_LENGTH = 1024 };
public:
tw_yy_scan( std::istream& i ) : yy_scan( MAX_TOKEN_LENGTH ), mIn(i) {}; // need to increase token length over mks default
explicit tw_yy_scan( std::istream& i ) : yy_scan( MAX_TOKEN_LENGTH ), mIn(i) {}; // need to increase token length over mks default
virtual int yygetc() { return mIn.get(); };
@ -123,7 +123,7 @@ private:
class cPolicyParser
{
public:
cPolicyParser( std::istream& in ); // input source
explicit cPolicyParser( std::istream& in ); // input source
void Execute( cGenreSpecListVector& policy, cErrorBucket* pError ); //throw(eError);
void Check( cErrorBucket* pError ); //throw(eError);