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