Kaydet (Commit) e69f752b authored tarafından Joseph Powers's avatar Joseph Powers

Remove DECLARE_LIST( RscBaseList, RscTop* )

üst e01c5fc7
......@@ -57,7 +57,7 @@ struct WriteRcContext
/****************** R s c T y p C o n ************************************/
// Liste die alle Basistypen enthaelt
DECLARE_LIST( RscBaseList, RscTop * )
typedef ::std::vector< RscTop* > RscBaseList;
// Tabelle fuer Systemabhaengige Resourcen
struct RscSysEntry
......@@ -332,7 +332,7 @@ public:
ByteString GetSysSearchPath() const { return aSysSearchPath; }
void InsertType( RscTop * pType )
{
aBaseLst.Insert( pType, LIST_APPEND );
aBaseLst.push_back( pType );
}
RscTop * SearchType( Atom nTypId );
RscTop * Search( Atom typ );
......
......@@ -224,7 +224,6 @@ void Pre_dtorTree( RscTop * pRscTop ){
}
RscTypCont :: ~RscTypCont(){
RscTop * pRscTmp;
RscSysEntry * pSysEntry;
// Alle Unterbaeume loeschen
......@@ -234,11 +233,8 @@ RscTypCont :: ~RscTypCont(){
// Alle Klassen noch gueltig, jeweilige Instanzen freigeben
// BasisTypen
pRscTmp = aBaseLst.First();
while( pRscTmp ){
pRscTmp->Pre_dtor();
pRscTmp = aBaseLst.Next();
};
for ( size_t i = 0, n = aBaseLst.size(); i < n; ++i )
aBaseLst[ i ]->Pre_dtor();
aBool.Pre_dtor();
aShort.Pre_dtor();
aUShort.Pre_dtor();
......@@ -256,9 +252,9 @@ RscTypCont :: ~RscTypCont(){
delete aVersion.pClass;
DestroyTree( pRoot );
while( NULL != (pRscTmp = aBaseLst.Remove()) ){
delete pRscTmp;
};
for ( size_t i = 0, n = aBaseLst.size(); i < n; ++i )
delete aBaseLst[ i ];
aBaseLst.clear();
while( NULL != (pSysEntry = aSysLst.Remove()) ){
delete pSysEntry;
......@@ -309,12 +305,11 @@ RscTop * RscTypCont::SearchType( Atom nId )
ELSE_IF( aLangString )
ELSE_IF( aLangShort )
RscTop * pEle = aBaseLst.First();
while( pEle )
for ( size_t i = 0, n = aBaseLst.size(); i < n; ++i )
{
RscTop* pEle = aBaseLst[ i ];
if( pEle->GetId() == nId )
return pEle;
pEle = aBaseLst.Next();
}
return NULL;
}
......@@ -921,8 +916,8 @@ ERRTYPE RscTypCont::WriteCxx( FILE * fOutput, ULONG nFileKey,
*************************************************************************/
void RscTypCont::WriteSyntax( FILE * fOutput )
{
for( sal_uInt32 i = 0; i < aBaseLst.Count(); i++ )
aBaseLst.GetObject( i )->WriteSyntaxHeader( fOutput, this );
for( size_t i = 0; i < aBaseLst.size(); i++ )
aBaseLst[ i ]->WriteSyntaxHeader( fOutput, this );
RscEnumerateRef aEnumRef( this, pRoot, fOutput );
aEnumRef.WriteSyntax();
}
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment