Prefer prefix ++/-- operators where possible, for performance reasons (per CppCheck)
This commit is contained in:
parent
5c1cfe4702
commit
9c38b49839
|
@ -140,7 +140,7 @@ void cBlockFile::Close()
|
|||
void cBlockFile::Flush()
|
||||
{
|
||||
ASSERT( mpArchive );
|
||||
for( BlockVector::iterator i = mvPagedBlocks.begin(); i != mvPagedBlocks.end(); i++ )
|
||||
for( BlockVector::iterator i = mvPagedBlocks.begin(); i != mvPagedBlocks.end(); ++i )
|
||||
{
|
||||
FlushBlock( &(*i) );
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ cBlockFile::Block* cBlockFile::GetBlock( int blockNum ) //throw (eArchive)
|
|||
mTimer++;
|
||||
if( mTimer == 0 )
|
||||
{
|
||||
for( BlockVector::iterator i = mvPagedBlocks.begin(); i != mvPagedBlocks.end(); i++ )
|
||||
for( BlockVector::iterator i = mvPagedBlocks.begin(); i != mvPagedBlocks.end(); ++i )
|
||||
{
|
||||
i->SetTimestamp( 0 );
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ cBlockFile::Block* cBlockFile::GetBlock( int blockNum ) //throw (eArchive)
|
|||
//
|
||||
// now, see if the desired block is in memory...
|
||||
//
|
||||
for( BlockVector::iterator i = mvPagedBlocks.begin(); i != mvPagedBlocks.end(); i++ )
|
||||
for( BlockVector::iterator i = mvPagedBlocks.begin(); i != mvPagedBlocks.end(); ++i )
|
||||
{
|
||||
if( i->GetBlockNum() == blockNum )
|
||||
{
|
||||
|
@ -201,9 +201,9 @@ cBlockFile::Block* cBlockFile::GetBlock( int blockNum ) //throw (eArchive)
|
|||
uint32 earliestTime = mvPagedBlocks[0].GetTimestamp();
|
||||
BlockVector::iterator it = mvPagedBlocks.begin();
|
||||
BlockVector::iterator earliestIter = it;
|
||||
it++; // since we don't want to check the first one
|
||||
++it; // since we don't want to check the first one
|
||||
ASSERT(it != mvPagedBlocks.end());
|
||||
for( ; it != mvPagedBlocks.end(); it++ )
|
||||
for( ; it != mvPagedBlocks.end(); ++it )
|
||||
{
|
||||
if( it->GetTimestamp() < earliestTime )
|
||||
{
|
||||
|
|
|
@ -277,7 +277,7 @@ int cBlockRecordFile::FindRoomForData( int32 dataSize ) //throw (eArchive)
|
|||
//
|
||||
BlockArray::iterator it;
|
||||
int cnt = 0;
|
||||
for( it = mvBlocks.begin(); it != mvBlocks.end(); it++, cnt++ )
|
||||
for( it = mvBlocks.begin(); it != mvBlocks.end(); ++it, ++cnt )
|
||||
{
|
||||
util_InitBlockArray( *it );
|
||||
if( it->GetAvailableSpace() >= dataSize )
|
||||
|
@ -310,7 +310,7 @@ void cBlockRecordFile::TraceContents(int dl) const
|
|||
{
|
||||
// TODO -- this is probably not what I want to do, but it helps me right now...
|
||||
//
|
||||
for( BlockArray::const_iterator i = mvBlocks.begin(); i != mvBlocks.end(); i++ )
|
||||
for( BlockArray::const_iterator i = mvBlocks.begin(); i != mvBlocks.end(); ++i )
|
||||
{
|
||||
i->TraceContents( dl );
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ void cBlockRecordFile::AssertValid() const
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
void cBlockRecordFile::AssertAllBlocksValid()
|
||||
{
|
||||
for( BlockArray::iterator i = mvBlocks.begin(); i != mvBlocks.end(); i++ )
|
||||
for( BlockArray::iterator i = mvBlocks.begin(); i != mvBlocks.end(); ++i )
|
||||
{
|
||||
i->AssertValid();
|
||||
}
|
||||
|
|
|
@ -405,7 +405,7 @@ bool cHierDatabaseIter::Done() const
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
void cHierDatabaseIter::Next()
|
||||
{
|
||||
mIter++;
|
||||
++mIter;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -552,10 +552,10 @@ void cHierDatabaseIter::CreateEntry( const TSTRING& name ) //throw (eArchive, eH
|
|||
{
|
||||
// altering the previous node...
|
||||
//
|
||||
mIter--;
|
||||
--mIter;
|
||||
mIter->mNext = newAddr;
|
||||
util_RewriteObject( mpDb, &(*mIter), GetCurrentAddr() );
|
||||
mIter++;
|
||||
++mIter;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -672,10 +672,10 @@ void cHierDatabaseIter::DeleteEntry() //throw (eArchive, eHierDatabase)
|
|||
{
|
||||
// altering the previous node...
|
||||
//
|
||||
mIter--;
|
||||
--mIter;
|
||||
mIter->mNext = (mIter+1)->mNext;
|
||||
util_RewriteObject( mpDb, &(*mIter), GetCurrentAddr() );
|
||||
mIter++;
|
||||
++mIter;
|
||||
}
|
||||
//
|
||||
// now, delete the node from the file and from our array...
|
||||
|
|
|
@ -75,7 +75,7 @@ cFCODataSourceIterImpl& cFCODataSourceIterImpl::operator=( const cFCODataSourceI
|
|||
//
|
||||
// we need to addref all of the fcos we just got...
|
||||
//
|
||||
for( FCOList::const_iterator i = mPeers.begin(); i != mPeers.end(); i++ )
|
||||
for( FCOList::const_iterator i = mPeers.begin(); i != mPeers.end(); ++i )
|
||||
{
|
||||
(*i)->AddRef();
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ bool cFCODataSourceIterImpl::Done() const
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
void cFCODataSourceIterImpl::Next()
|
||||
{
|
||||
mCurPos++;
|
||||
++mCurPos;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -282,7 +282,7 @@ bool cFCODataSourceIterImpl::IsCaseSensitive() const
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
void cFCODataSourceIterImpl::ClearList()
|
||||
{
|
||||
for( mCurPos = mPeers.begin(); mCurPos != mPeers.end(); mCurPos++ )
|
||||
for( mCurPos = mPeers.begin(); mCurPos != mPeers.end(); ++mCurPos )
|
||||
{
|
||||
(*mCurPos)->Release();
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ void cFCODataSourceIterImpl::GeneratePeers()
|
|||
//
|
||||
std::vector<TSTRING>::iterator i;
|
||||
cFCOName curName = mParentName;
|
||||
for( i = vChildrenNames.begin(); i != vChildrenNames.end(); i++)
|
||||
for( i = vChildrenNames.begin(); i != vChildrenNames.end(); ++i)
|
||||
{
|
||||
curName.Push( *i );
|
||||
|
||||
|
@ -369,7 +369,7 @@ void cFCODataSourceIterImpl::TraceContents(int dl) const
|
|||
d.Trace( dl, "FCO Iterator; parent = %s\n", mParentName.AsString().c_str() );
|
||||
d.Trace( dl, "---- Peers ---- (current has a * by it)\n" );
|
||||
int cnt = 0;
|
||||
for( FCOList::const_iterator iter = mPeers.begin(); iter != mPeers.end(); iter++, cnt++ )
|
||||
for( FCOList::const_iterator iter = mPeers.begin(); iter != mPeers.end(); ++iter, ++cnt )
|
||||
{
|
||||
d.Trace( dl, "[%d]%c\t:%s\n", cnt, iter == mCurPos ? _T('*') : _T(' '), (*iter)->GetName().AsString().c_str() );
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ TSTRING cFCOName::AsString() const
|
|||
TSTRING current = (*i)->GetString();
|
||||
// the loop is constructed in this odd fashion because I don't want a trailing mDelimiter
|
||||
str += current;
|
||||
i++;
|
||||
++i;
|
||||
|
||||
if(i != mpPathName->mNames.end() && current != "/")
|
||||
str += mDelimiter;
|
||||
|
@ -343,7 +343,7 @@ cFCOName::Relationship cFCOName::GetRelationship(const cFCOName& rhs) const
|
|||
|
||||
for(myIter = mpPathName->mNames.begin(), rhsIter = rhs.mpPathName->mNames.begin();
|
||||
(myIter != mpPathName->mNames.end() && rhsIter != rhs.mpPathName->mNames.end());
|
||||
myIter++, rhsIter++)
|
||||
++myIter, ++rhsIter)
|
||||
{
|
||||
if(bCaseSensitive)
|
||||
bEqual = (*myIter == *rhsIter);
|
||||
|
@ -522,7 +522,7 @@ bool cFCOName::operator<(const cFCOName& rhs) const
|
|||
|
||||
for(myIter = mpPathName->mNames.begin(), rhsIter = rhs.mpPathName->mNames.begin();
|
||||
(myIter != mpPathName->mNames.end() && rhsIter != rhs.mpPathName->mNames.end());
|
||||
myIter++, rhsIter++)
|
||||
++myIter, ++rhsIter)
|
||||
{
|
||||
if(bCaseSensitive)
|
||||
{
|
||||
|
@ -593,7 +593,7 @@ void cFCONameIter::SeekBegin()
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
void cFCONameIter::Next()
|
||||
{
|
||||
mIter++;
|
||||
++mIter;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -619,7 +619,7 @@ const TCHAR* cFCONameIter::GetName() const
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
void cFCONameIter::Prev()
|
||||
{
|
||||
mIter--;
|
||||
--mIter;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -204,7 +204,7 @@ void cFCOSetImpl::Write(iSerializer* pSerializer) const
|
|||
pSerializer->WriteInt32(mFCOSet.size());
|
||||
|
||||
std::set<cFCONode>::const_iterator itr;
|
||||
for( itr = mFCOSet.begin(); itr != mFCOSet.end(); itr++)
|
||||
for( itr = mFCOSet.begin(); itr != mFCOSet.end(); ++itr)
|
||||
{
|
||||
pSerializer->WriteObjectDynCreate(itr->mpFCO);
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ bool cFCOIterImpl::IsEmpty() const
|
|||
void cFCOIterImpl::Next() const
|
||||
{
|
||||
ASSERT(mpSet != 0);
|
||||
mIter++;
|
||||
++mIter;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ inline bool cFCOSpecAttrEmailIter::IsEmpty() const
|
|||
}
|
||||
inline void cFCOSpecAttrEmailIter::Next() const
|
||||
{
|
||||
mIter++;
|
||||
++mIter;
|
||||
}
|
||||
inline const TSTRING& cFCOSpecAttrEmailIter::EmailAddress() const
|
||||
{
|
||||
|
|
|
@ -221,7 +221,7 @@ void cFCOSpecStopPointSet::Add(const cFCOName& name)
|
|||
break;
|
||||
|
||||
default:
|
||||
i++;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,7 +306,7 @@ iFCOSpecHelper::CompareResult cFCOSpecStopPointSet::Compare(const iFCOSpecHelper
|
|||
|
||||
std::set<cFCOName>::const_iterator myIter = mStopPoints.begin(),
|
||||
rhsIter = pStopPtSet->mStopPoints.begin();
|
||||
for(; myIter != mStopPoints.end(); myIter++, rhsIter++)
|
||||
for(; myIter != mStopPoints.end(); ++myIter, ++rhsIter)
|
||||
{
|
||||
if(*myIter != *rhsIter)
|
||||
return ((*myIter < *rhsIter) ? CMP_LT : CMP_GT);
|
||||
|
|
|
@ -257,7 +257,7 @@ inline bool cFCOSpecStopPointIter::IsEmpty() const
|
|||
|
||||
inline void cFCOSpecStopPointIter::Next() const
|
||||
{
|
||||
mIter++;
|
||||
++mIter;
|
||||
}
|
||||
|
||||
inline void cFCOSpecStopPointIter::Remove()
|
||||
|
|
|
@ -61,7 +61,7 @@ void cFCOSpecList::Clear()
|
|||
{
|
||||
std::list<PairType>::iterator itr;
|
||||
|
||||
for (itr = mAddedList.begin(); itr != mAddedList.end(); itr++)
|
||||
for (itr = mAddedList.begin(); itr != mAddedList.end(); ++itr)
|
||||
{
|
||||
itr->first->Release();
|
||||
itr->second->Release();
|
||||
|
@ -227,7 +227,7 @@ void cFCOSpecListAddedIter::Remove()
|
|||
|
||||
// the tricky part is finding the spec in the other list...
|
||||
std::list<cFCOSpecList::PairType>::iterator i;
|
||||
for(i = mpSpecList->mCanonicalList.begin(); i != mpSpecList->mCanonicalList.end(); i++)
|
||||
for(i = mpSpecList->mCanonicalList.begin(); i != mpSpecList->mCanonicalList.end(); ++i)
|
||||
{
|
||||
if(i->first == mIter->first)
|
||||
break;
|
||||
|
|
|
@ -223,7 +223,7 @@ cGenre::Genre cGenreSwitcher::StringToGenre( const wchar_t* wsz )
|
|||
cGenreInfoVec::const_iterator cGenreInfoVec::find( cGenre::Genre g ) const
|
||||
{
|
||||
const_iterator i;
|
||||
for( i = begin(); i != end(); i++ )
|
||||
for( i = begin(); i != end(); ++i )
|
||||
{
|
||||
ASSERT( (*i)->m_ID != cGenre::GENRE_INVALID );
|
||||
|
||||
|
@ -244,7 +244,7 @@ cGenreInfoVec::const_iterator cGenreInfoVec::find( const cGenreInfo* pGI ) const
|
|||
cGenreInfoVec::const_iterator cGenreInfoVec::find( const TSTRING& sGenre ) const
|
||||
{
|
||||
const_iterator i;
|
||||
for( i = begin(); i != end(); i++ )
|
||||
for( i = begin(); i != end(); ++i )
|
||||
{
|
||||
ASSERT( (*i)->m_ID != cGenre::GENRE_INVALID );
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ static inline void trim_leading_whitespace(std::string &str)
|
|||
void cFSParserUtil::InterpretFCOName( const std::list<TSTRING>& l, cFCOName& nameOut ) const
|
||||
{
|
||||
TSTRING strT;
|
||||
for( std::list<TSTRING>::const_iterator i = l.begin(); i != l.end(); i++ )
|
||||
for( std::list<TSTRING>::const_iterator i = l.begin(); i != l.end(); ++i )
|
||||
strT += *i;
|
||||
|
||||
#if USES_DEVICE_PATH
|
||||
|
|
|
@ -151,7 +151,7 @@ void cFSPropDisplayer::Merge( const iFCOPropDisplayer* const ppd )
|
|||
// merge mapping info
|
||||
for( INT64_TO_STRING_MAP::const_iterator iterUID = pfspd->uidToUsername.begin();
|
||||
iterUID != pfspd->uidToUsername.end();
|
||||
iterUID++
|
||||
++iterUID
|
||||
)
|
||||
{
|
||||
AddUsernameMapping( iterUID->first, iterUID->second );
|
||||
|
@ -159,7 +159,7 @@ void cFSPropDisplayer::Merge( const iFCOPropDisplayer* const ppd )
|
|||
|
||||
for( INT64_TO_STRING_MAP::const_iterator iterGID = pfspd->gidToGroupname.begin();
|
||||
iterGID != pfspd->gidToGroupname.end();
|
||||
iterGID++
|
||||
++iterGID
|
||||
)
|
||||
{
|
||||
AddGroupnameMapping( iterGID->first, iterGID->second );
|
||||
|
@ -401,7 +401,7 @@ void cFSPropDisplayer::Write( iSerializer* pSerializer ) const
|
|||
{
|
||||
// write UID mapping
|
||||
pSerializer->WriteInt32( uidToUsername.size() );
|
||||
for( INT64_TO_STRING_MAP::const_iterator iterUid = uidToUsername.begin(); iterUid != uidToUsername.end(); iterUid++ )
|
||||
for( INT64_TO_STRING_MAP::const_iterator iterUid = uidToUsername.begin(); iterUid != uidToUsername.end(); ++iterUid )
|
||||
{
|
||||
pSerializer->WriteInt64( iterUid->first );
|
||||
pSerializer->WriteString( iterUid->second );
|
||||
|
@ -409,7 +409,7 @@ void cFSPropDisplayer::Write( iSerializer* pSerializer ) const
|
|||
|
||||
// write GID mapping
|
||||
pSerializer->WriteInt32( gidToGroupname.size() );
|
||||
for( INT64_TO_STRING_MAP::const_iterator iterGid = gidToGroupname.begin(); iterGid != gidToGroupname.end(); iterGid++ )
|
||||
for( INT64_TO_STRING_MAP::const_iterator iterGid = gidToGroupname.begin(); iterGid != gidToGroupname.end(); ++iterGid )
|
||||
{
|
||||
pSerializer->WriteInt64( iterGid->first );
|
||||
pSerializer->WriteString( iterGid->second );
|
||||
|
|
|
@ -78,7 +78,7 @@ void TestGenerateDb()
|
|||
// ok, time to integrity check!
|
||||
//
|
||||
cGenreSpecListVector::iterator at;
|
||||
for( at = slv.begin(); at != slv.end(); at++ )
|
||||
for( at = slv.begin(); at != slv.end(); ++at )
|
||||
{
|
||||
cGenerateDb::Execute(
|
||||
at->GetSpecList(),
|
||||
|
|
|
@ -593,7 +593,7 @@ void cIntegrityCheck::ExecuteOnObjectList( const std::list<cFCOName>& fcoNames,
|
|||
// iterate over all the objects to integrity check..
|
||||
//
|
||||
std::list<cFCOName>::const_iterator it;
|
||||
for( it = fcoNames.begin(); it != fcoNames.end(); it++ )
|
||||
for( it = fcoNames.begin(); it != fcoNames.end(); ++it )
|
||||
{
|
||||
TW_NOTIFY_VERBOSE( _T("%s%s\n"),
|
||||
TSS_GetString( cTripwire, tripwire::STR_NOTIFY_CHECKING ).c_str(),
|
||||
|
|
|
@ -80,7 +80,7 @@ void TestIntegrityCheck()
|
|||
// ok, time to integrity check!
|
||||
//
|
||||
cGenreSpecListVector::iterator at;
|
||||
for( at = slv.begin(); at != slv.end(); at++ )
|
||||
for( at = slv.begin(); at != slv.end(); ++at )
|
||||
{
|
||||
cIntegrityCheck ic( at->GetGenre(), at->GetSpecList(), db, report, &et );
|
||||
ic.Execute();
|
||||
|
|
|
@ -130,7 +130,7 @@ bool cMailMessage::GetAttachmentsAsString( std::string& s )
|
|||
bool allOK = true;
|
||||
for( std::vector<TSTRING>::const_iterator at = mvstrAttachments.begin();
|
||||
at != mvstrAttachments.end();
|
||||
at++ )
|
||||
++at )
|
||||
{
|
||||
s += "\r\n";
|
||||
|
||||
|
@ -349,7 +349,7 @@ cQuotedPrintableEncoding::Encode( const std::string& sIn,
|
|||
std::string::size_type lineLen = 0;
|
||||
for( at = sIn.begin();
|
||||
at != sIn.end();
|
||||
at++, lineLen += _ENCODED_CHAR_LEN )
|
||||
++at, lineLen += _ENCODED_CHAR_LEN )
|
||||
{
|
||||
if( NeedsEncoding( *at ) )
|
||||
{
|
||||
|
@ -481,7 +481,7 @@ cMailMessageUtil::HasNonAsciiChars( const std::string& s )
|
|||
{
|
||||
for( std::string::const_iterator at = s.begin();
|
||||
at != s.end();
|
||||
at ++ )
|
||||
++at )
|
||||
{
|
||||
if( (unsigned char)*at > (unsigned char)0x7F )
|
||||
return true;
|
||||
|
|
|
@ -1123,7 +1123,7 @@ int cTWModeIC::Execute(cErrorQueue* pQueue)
|
|||
//
|
||||
// now, we will iterate over the list, performing an integrity check for each genre
|
||||
//
|
||||
for( cTWUtil::GenreObjList::iterator genreIter = listOut.begin(); genreIter != listOut.end(); genreIter++ )
|
||||
for( cTWUtil::GenreObjList::iterator genreIter = listOut.begin(); genreIter != listOut.end(); ++genreIter )
|
||||
{
|
||||
dbIter.SeekToGenre( genreIter->first );
|
||||
if( ! dbIter.Done() )
|
||||
|
@ -1134,7 +1134,7 @@ int cTWModeIC::Execute(cErrorQueue* pQueue)
|
|||
// I have to turn this into a list of cFCONames
|
||||
//
|
||||
std::list<cFCOName> fcoNames;
|
||||
for(cTWUtil::ObjList::iterator it = genreIter->second.begin(); it != genreIter->second.end(); it++)
|
||||
for(cTWUtil::ObjList::iterator it = genreIter->second.begin(); it != genreIter->second.end(); ++it)
|
||||
{
|
||||
// if this is not an absolute path, warn and continue...
|
||||
//
|
||||
|
|
|
@ -179,7 +179,7 @@ static void SplitString( const TSTRING& str, TCHAR c, std::vector<TSTRING>& vStr
|
|||
vStrings.clear();
|
||||
|
||||
TSTRING::const_iterator i, prev;
|
||||
for( prev = i = str.begin(); i != str.end(); i++ )
|
||||
for( prev = i = str.begin(); i != str.end(); ++i )
|
||||
{
|
||||
if( *i == c )
|
||||
{
|
||||
|
@ -284,7 +284,7 @@ void cDbExplore::Execute( cFCODatabaseFileIter& dbIter )
|
|||
GetNoun(noun);
|
||||
std::vector<TSTRING> vDirs;
|
||||
SplitString( noun, pIter->GetParentName().GetDelimiter(), vDirs );
|
||||
for( std::vector<TSTRING>::iterator i = vDirs.begin(); i != vDirs.end(); i++ )
|
||||
for( std::vector<TSTRING>::iterator i = vDirs.begin(); i != vDirs.end(); ++i )
|
||||
{
|
||||
|
||||
if( i->compare( _T("..") ) == 0 )
|
||||
|
|
|
@ -72,7 +72,7 @@ cFCODatabaseFile::cFCODatabaseFile()
|
|||
|
||||
cFCODatabaseFile::~cFCODatabaseFile()
|
||||
{
|
||||
for( DbList::iterator i = mDbList.begin(); i != mDbList.end(); i++ )
|
||||
for( DbList::iterator i = mDbList.begin(); i != mDbList.end(); ++i )
|
||||
{
|
||||
delete *i;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ void cFCODatabaseFile::Write(iSerializer* pSerializer) const //throw( eFCODbFile
|
|||
//
|
||||
// TODO -- the database is not really const-correct; therefore I have the sick casts below...
|
||||
//
|
||||
for( DbList::iterator i = const_cast<DbList*>(&mDbList)->begin(); i != const_cast<DbList*>(&mDbList)->end(); i++ )
|
||||
for( DbList::iterator i = const_cast<DbList*>(&mDbList)->begin(); i != const_cast<DbList*>(&mDbList)->end(); ++i )
|
||||
{
|
||||
pSerializer->WriteInt32 ( (*i)->mGenre );
|
||||
pSerializer->WriteObject ( &(*i)->mGenreHeader );
|
||||
|
@ -193,7 +193,7 @@ void cFCODatabaseFile::AddGenre( cGenre::Genre genreId, cFCODatabaseFileIter* pI
|
|||
//
|
||||
// first, lets make sure this genre doesn't exist...
|
||||
//
|
||||
for( DbList::iterator i = mDbList.begin(); i != mDbList.end(); i++ )
|
||||
for( DbList::iterator i = mDbList.begin(); i != mDbList.end(); ++i )
|
||||
{
|
||||
if( (*i)->mGenre == genreId )
|
||||
{
|
||||
|
@ -254,7 +254,7 @@ void cFCODatabaseFileIter::SeekBegin()
|
|||
|
||||
void cFCODatabaseFileIter::Next()
|
||||
{
|
||||
mIter++;
|
||||
++mIter;
|
||||
}
|
||||
|
||||
bool cFCODatabaseFileIter::Done() const
|
||||
|
|
|
@ -433,7 +433,7 @@ void cFCOReportSpecIter::SeekBegin() const
|
|||
void cFCOReportSpecIter::Next() const
|
||||
{
|
||||
ASSERT(mpData != 0);
|
||||
mpData->mIter++;
|
||||
++(mpData->mIter);
|
||||
}
|
||||
|
||||
bool cFCOReportSpecIter::Done() const
|
||||
|
@ -450,7 +450,7 @@ const iFCOSpec* cFCOReportSpecIter::GetSpec() const
|
|||
bool cFCOReportSpecIter::SeekToSpec(const iFCOSpec* pSpec)
|
||||
{
|
||||
if (mpData)
|
||||
for(mpData->mIter = mpData->mpList->begin(); mpData->mIter != mpData->mpList->end(); mpData->mIter++)
|
||||
for(mpData->mIter = mpData->mpList->begin(); mpData->mIter != mpData->mpList->end(); ++(mpData->mIter))
|
||||
{
|
||||
if(iFCOSpecUtil::FCOSpecEqual(*mpData->mIter->mpSpec, *pSpec))
|
||||
return true;
|
||||
|
@ -563,7 +563,7 @@ void cFCOReportChangeIter::SeekBegin() const
|
|||
void cFCOReportChangeIter::Next() const
|
||||
{
|
||||
ASSERT(mpData->mpList != 0);
|
||||
mpData->mIter++;
|
||||
++(mpData->mIter);
|
||||
}
|
||||
|
||||
bool cFCOReportChangeIter::Done() const
|
||||
|
@ -707,7 +707,7 @@ void cFCOReport::AddSpec(cGenre::Genre genre, const iFCOSpec* pSpec, const cFCOS
|
|||
if (pIter && pIter->mpData && pIter->mpData->mpList == &genreIter->mSpecList)
|
||||
{
|
||||
pIter->mpData->mIter = genreIter->mSpecList.end();
|
||||
pIter->mpData->mIter--;
|
||||
--(pIter->mpData->mIter);
|
||||
ASSERT(pIter->GetSpec() == node.mpSpec);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ cTextReportViewer::~cTextReportViewer()
|
|||
{
|
||||
if( mfUpdate )
|
||||
{
|
||||
for( GenreList::iterator i = mFCOsRemoveFromReport.begin(); i != mFCOsRemoveFromReport.end(); i++ )
|
||||
for( GenreList::iterator i = mFCOsRemoveFromReport.begin(); i != mFCOsRemoveFromReport.end(); ++i )
|
||||
{
|
||||
ASSERT( i->second != 0 );
|
||||
i->second->clear();
|
||||
|
@ -1051,7 +1051,7 @@ void cTextReportViewer::RemoveFCOsFromReport() //throw (eTextReportViewer)
|
|||
//
|
||||
// see if any FCOs to remove are in this set
|
||||
//
|
||||
for( iter = pFCOList->begin(); iter != pFCOList->end(); iter++ )
|
||||
for( iter = pFCOList->begin(); iter != pFCOList->end(); ++iter )
|
||||
{
|
||||
fcoIter = pAddedSet->Lookup( *iter );
|
||||
if( fcoIter )
|
||||
|
@ -1071,7 +1071,7 @@ void cTextReportViewer::RemoveFCOsFromReport() //throw (eTextReportViewer)
|
|||
//
|
||||
// see if any FCOs to remove are in this set
|
||||
//
|
||||
for( iter = pFCOList->begin(); iter != pFCOList->end(); iter++ )
|
||||
for( iter = pFCOList->begin(); iter != pFCOList->end(); ++iter )
|
||||
{
|
||||
fcoIter = pRemovedSet->Lookup( *iter );
|
||||
if( fcoIter )
|
||||
|
@ -1084,7 +1084,7 @@ void cTextReportViewer::RemoveFCOsFromReport() //throw (eTextReportViewer)
|
|||
}
|
||||
|
||||
|
||||
for( iter = pFCOList->begin(); iter != pFCOList->end(); iter++ )
|
||||
for( iter = pFCOList->begin(); iter != pFCOList->end(); ++iter )
|
||||
{
|
||||
// search changed
|
||||
// get changed set iterator
|
||||
|
@ -1110,7 +1110,7 @@ void cTextReportViewer::RemoveFCOsFromReport() //throw (eTextReportViewer)
|
|||
//
|
||||
int nFCOsToRemove = 0;
|
||||
cTextReportViewer::GenreList::const_iterator iter = mFCOsRemoveFromReport.begin();
|
||||
for( ; iter != mFCOsRemoveFromReport.end(); iter++ )
|
||||
for( ; iter != mFCOsRemoveFromReport.end(); ++iter )
|
||||
nFCOsToRemove += iter->second->size();
|
||||
|
||||
if( nFCOsToRemove != nFCOsRemoved )
|
||||
|
|
|
@ -1228,7 +1228,7 @@ void cTWUtil::ParseObjectList( cTWUtil::GenreObjList& listOut, const cTWUtil::Ob
|
|||
|
||||
// iterate over all of the input...
|
||||
//
|
||||
for( ObjList::const_iterator i = listIn.begin(); i != listIn.end(); i++ )
|
||||
for( ObjList::const_iterator i = listIn.begin(); i != listIn.end(); ++i )
|
||||
{
|
||||
// first, try to interperate the current string as a genre name...
|
||||
// 17 Mar 99 mdb -- we now only do this if the string ends in a ':'
|
||||
|
@ -1261,7 +1261,7 @@ void cTWUtil::ParseObjectList( cTWUtil::GenreObjList& listOut, const cTWUtil::Ob
|
|||
{
|
||||
// seek to right list; create it if it is not there...
|
||||
//
|
||||
for( curIter = listOut.begin(); curIter != listOut.end(); curIter++ )
|
||||
for( curIter = listOut.begin(); curIter != listOut.end(); ++curIter )
|
||||
{
|
||||
if( curIter->first == curGenre )
|
||||
break;
|
||||
|
@ -1282,7 +1282,7 @@ void cTWUtil::ParseObjectList( cTWUtil::GenreObjList& listOut, const cTWUtil::Ob
|
|||
// add this to the list; assert that it has not been added yet.
|
||||
//
|
||||
ObjList::iterator oi;
|
||||
for( oi = curIter->second.begin(); oi != curIter->second.end(); oi++ )
|
||||
for( oi = curIter->second.begin(); oi != curIter->second.end(); ++oi )
|
||||
{
|
||||
if( *oi == *i )
|
||||
{
|
||||
|
|
|
@ -108,7 +108,7 @@ bool cGenreParseInfo::RulePointAlreadyDefined( const cFCOName& fcoName )
|
|||
bool fFound = false;
|
||||
|
||||
// check start points
|
||||
for( RuleListType::iterator i = mRuleList.begin(); i != mRuleList.end(); i++ )
|
||||
for( RuleListType::iterator i = mRuleList.begin(); i != mRuleList.end(); ++i )
|
||||
{
|
||||
if( (*i)->GetName() == fcoName )
|
||||
fFound = true;
|
||||
|
@ -117,7 +117,7 @@ bool cGenreParseInfo::RulePointAlreadyDefined( const cFCOName& fcoName )
|
|||
// check stop points
|
||||
if( ! fFound )
|
||||
{
|
||||
for( StopListType::iterator j = mStopList.begin(); j != mStopList.end(); j++ )
|
||||
for( StopListType::iterator j = mStopList.begin(); j != mStopList.end(); ++j )
|
||||
{
|
||||
if( *j == fcoName )
|
||||
fFound = true;
|
||||
|
|
|
@ -144,7 +144,7 @@ void cParserHelper::Finit( cGenreSpecListVector* pPolicy )
|
|||
int nRulesInPolicy = 0;
|
||||
|
||||
GenreContainer::iterator i;
|
||||
for( i = mAph.begin(); i != mAph.end(); i++ )
|
||||
for( i = mAph.begin(); i != mAph.end(); ++i )
|
||||
{
|
||||
cGenreSpecListPair slp;
|
||||
cGenre::Genre g = i->first;
|
||||
|
@ -193,7 +193,7 @@ void cParserHelper::Finit( cGenreSpecListVector* pPolicy )
|
|||
void cParserHelper::CleanUp()
|
||||
{
|
||||
GenreContainer::iterator i;
|
||||
for( i = mAph.begin(); i != mAph.end(); i++ )
|
||||
for( i = mAph.begin(); i != mAph.end(); ++i )
|
||||
delete i->second;
|
||||
while( ! cPreprocessor::Empty() )
|
||||
cPreprocessor::PopState();
|
||||
|
@ -390,7 +390,7 @@ bool cParserUtil::AnyOfTheseHostsExists( cParseStringList* pList )
|
|||
std::transform( strHostName.begin(), strHostName.end(), strHostName.begin(), _totlower );
|
||||
|
||||
// if the host name matches any in the list, return true
|
||||
for( std::list<TSTRING>::iterator iter = pList->begin(); iter != pList->end(); iter++ )
|
||||
for( std::list<TSTRING>::iterator iter = pList->begin(); iter != pList->end(); ++iter )
|
||||
{
|
||||
// want to do case-insensitive compare
|
||||
std::transform( (*iter).begin(), (*iter).end(), (*iter).begin(), _totlower );
|
||||
|
@ -531,7 +531,7 @@ void cParserUtil::CreateFCOSpecs( cGenre::Genre g, cGenreParseInfo* pgpi, cFCOSp
|
|||
|
||||
// foreach rule
|
||||
std::list<const cParseRule *>::iterator rule;
|
||||
for (rule = pgpi->GetRules()->begin(); rule != pgpi->GetRules()->end(); rule++)
|
||||
for (rule = pgpi->GetRules()->begin(); rule != pgpi->GetRules()->end(); ++rule)
|
||||
{
|
||||
//
|
||||
// create the spec with its the last element of its start point as its name.
|
||||
|
@ -557,7 +557,7 @@ void cParserUtil::CreateFCOSpecs( cGenre::Genre g, cGenreParseInfo* pgpi, cFCOSp
|
|||
|
||||
// set stop points
|
||||
cGenreParseInfo::StopListType::iterator stop;
|
||||
for (stop = pgpi->GetStopList()->begin(); stop != pgpi->GetStopList()->end(); stop++)
|
||||
for (stop = pgpi->GetStopList()->begin(); stop != pgpi->GetStopList()->end(); ++stop)
|
||||
{
|
||||
// add stop point if below start point
|
||||
cFCOName::Relationship relate = startpoint.GetRelationship(*stop);
|
||||
|
@ -677,7 +677,7 @@ void cParserUtil::CreatePropVector( const TSTRING& strPropListC, class cFCOPropV
|
|||
|
||||
TSTRING::const_iterator iter;
|
||||
TSTRING::size_type i; // index into string
|
||||
for ( iter = strPropList.begin(), i = 0; iter != strPropList.end(); iter++, i++ )
|
||||
for ( iter = strPropList.begin(), i = 0; iter != strPropList.end(); ++iter, ++i )
|
||||
{
|
||||
int propIndex = -1; // index into propvector
|
||||
|
||||
|
@ -825,7 +825,7 @@ cParseNamedAttrList* cParserHelper::GetGlobalAttrList()
|
|||
void cParserHelper::IncrementScopeStatementCount()
|
||||
{
|
||||
// must add count to ALL previous scopes.
|
||||
for( ScopedAttrContainer::iterator i = mScopedAttrs.begin(); i != mScopedAttrs.end(); i++ )
|
||||
for( ScopedAttrContainer::iterator i = mScopedAttrs.begin(); i != mScopedAttrs.end(); ++i )
|
||||
(*i)->IncrementStatementCount();
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ void
|
|||
cParseSpecMaskList::Dump(cDebug &d) const
|
||||
{
|
||||
std::list<cParseSpecMask *>::const_iterator ispec;
|
||||
for (ispec = mList.begin(); ispec != mList.end(); ispec++) {
|
||||
for (ispec = mList.begin(); ispec != mList.end(); ++ispec) {
|
||||
(*ispec)->Dump(d);
|
||||
}
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ cParseNamedAttrList::~cParseNamedAttrList()
|
|||
|
||||
void cParseNamedAttrList::Clear()
|
||||
{
|
||||
for( std::list<cParseNamedAttr*>::iterator iter = mList.begin(); iter != mList.end(); iter++ )
|
||||
for( std::list<cParseNamedAttr*>::iterator iter = mList.begin(); iter != mList.end(); ++iter )
|
||||
{
|
||||
delete *iter;
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ cParseNamedAttrList::Dump(cDebug &d) const
|
|||
{
|
||||
// dump out each named attribute
|
||||
std::list<cParseNamedAttr *>::const_iterator iattr;
|
||||
for (iattr = mList.begin(); iattr != mList.end(); iattr++) {
|
||||
for (iattr = mList.begin(); iattr != mList.end(); ++iattr) {
|
||||
(*iattr)->Dump(d);
|
||||
}
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ cParseNamedAttrList::constListIter cParseNamedAttrList::Find( const cParseNamedA
|
|||
for(
|
||||
std::list< cParseNamedAttr * >::const_iterator iter = mList.begin();
|
||||
iter != mList.end();
|
||||
iter++
|
||||
++iter
|
||||
)
|
||||
{
|
||||
if( (*iter)->GetName() == pa->GetName() )
|
||||
|
@ -356,7 +356,7 @@ void cParseNamedAttrList::MergeNoOverwrite( const cParseNamedAttrList* const pal
|
|||
if( pal )
|
||||
{
|
||||
// foreach attribute in pal
|
||||
for( constListIter newIter = pal->mList.begin(); newIter != pal->mList.end(); newIter++ )
|
||||
for( constListIter newIter = pal->mList.begin(); newIter != pal->mList.end(); ++newIter )
|
||||
{
|
||||
// look for this attribute in this list
|
||||
constListIter thisIter = Find( *newIter );
|
||||
|
@ -384,7 +384,7 @@ const cParseNamedAttr* cParseNamedAttrList::Lookup( const TSTRING& tstrAttrName
|
|||
{
|
||||
constListIter i;
|
||||
|
||||
for( i = mList.begin(); i != mList.end(); i++)
|
||||
for( i = mList.begin(); i != mList.end(); ++i)
|
||||
{
|
||||
if( 0 == tstrAttrName.compare( (*i)->GetName() ) )
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ class iParserGenreUtil;
|
|||
// INLINE FUNCTIONS
|
||||
//=========================================================================
|
||||
|
||||
#define KILL_LIST(type, name) do { for( std::list<type*>::iterator iter = mList.begin(); iter != mList.end(); iter++ ) { delete *iter; } } while(0)
|
||||
#define KILL_LIST(type, name) do { for( std::list<type*>::iterator iter = mList.begin(); iter != mList.end(); ++iter ) { delete *iter; } } while(0)
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -719,7 +719,7 @@ int cTWPrintDBMode::Execute(cErrorQueue* pQueue)
|
|||
// now, iterate through the list of objects...
|
||||
//
|
||||
cFCODatabaseFile::iterator dbIter( db );
|
||||
for( cTWUtil::GenreObjList::iterator genreIter = listOut.begin(); genreIter != listOut.end(); genreIter++ )
|
||||
for( cTWUtil::GenreObjList::iterator genreIter = listOut.begin(); genreIter != listOut.end(); ++genreIter )
|
||||
{
|
||||
dbIter.SeekToGenre( genreIter->first );
|
||||
if( ! dbIter.Done() )
|
||||
|
@ -731,7 +731,7 @@ int cTWPrintDBMode::Execute(cErrorQueue* pQueue)
|
|||
//
|
||||
// iterate over all the objects in this genre....
|
||||
//
|
||||
for(cTWUtil::ObjList::iterator it = genreIter->second.begin(); it != genreIter->second.end(); it++)
|
||||
for(cTWUtil::ObjList::iterator it = genreIter->second.begin(); it != genreIter->second.end(); ++it)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
template< class CharT > bool IsPrintable( const std::basic_string< CharT >& str )
|
||||
{
|
||||
const std::ctype< CharT > *pct = 0, &ct = tss::GetFacet( std::locale(), pct );
|
||||
for( std::basic_string< CharT >::const_iterator at = str.begin(); at != str.end(); at++ )
|
||||
for( std::basic_string< CharT >::const_iterator at = str.begin(); at != str.end(); ++at )
|
||||
{
|
||||
if( ! ct.is( std::ctype_base::print, *at ) ) // if not printable
|
||||
return false;
|
||||
|
|
|
@ -416,7 +416,7 @@ void MakeFile( TSTRING& strNameMakeMe )
|
|||
pFSServices->MakeTempFilename( strNameMakeMe );
|
||||
|
||||
std::string strA;
|
||||
for( TSTRING::iterator i = strNameMakeMe.begin(); i != strNameMakeMe.end(); i++ )
|
||||
for( TSTRING::iterator i = strNameMakeMe.begin(); i != strNameMakeMe.end(); ++i )
|
||||
{
|
||||
char ach[6];
|
||||
ASSERT( MB_CUR_MAX <= 6 );
|
||||
|
|
|
@ -69,7 +69,7 @@ void TestUnixFSServices()
|
|||
|
||||
std::vector <TSTRING>::iterator p;
|
||||
size_t n = 0;
|
||||
for (p = v.begin(); p != v.end(); p++) {
|
||||
for (p = v.begin(); p != v.end(); ++p) {
|
||||
d.TraceDetail(" %s\n", p->c_str());
|
||||
n++;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ TSTRING& cStringEncoder::Encode( const TSTRING& in, TSTRING& out )
|
|||
//
|
||||
out.reserve( in.length() );
|
||||
|
||||
for( TSTRING::const_iterator i = in.begin(); i != in.end(); i++ )
|
||||
for( TSTRING::const_iterator i = in.begin(); i != in.end(); ++i )
|
||||
ce.EncodeChar( i, out );
|
||||
|
||||
return out;
|
||||
|
@ -143,7 +143,7 @@ TSTRING& cStringEncoder::Unencode( const TSTRING& in, TSTRING& out )
|
|||
out.reserve( in.length() );
|
||||
|
||||
TSTRING::const_iterator end = in.end();
|
||||
for( TSTRING::const_iterator i = in.begin(); i != end; i++ )
|
||||
for( TSTRING::const_iterator i = in.begin(); i != end; ++i )
|
||||
out += ce.DecodeChar( i, end );
|
||||
|
||||
return out;
|
||||
|
|
Loading…
Reference in New Issue